Just a quick question around how I can split a variable.
I have a created a data frame called d.
R code is shown below.
x1 = c(1, 2, 3, 4)
x2 = c(5, 6, 7, 8)
x1x2 = paste(x1, x2, sep = ",")
x3 = c(10, 20)
x4 = c(100, 200, 300, 400, 500)
d = data.frame(expand.grid(x1x2, x3, x4))
From data d, how can I split x1x2 variable so that x1 and x2 are separated?
Many thanks in advance.