I've a dataframe,df, in this format:
Variable X Y
Var1 1,2,3 .2,.3,.4
Var2 2,3,4 .2,.1,.4
Var3 2,2,1 .1,.2,.4
If I do
df$X[1]
it will give me the following output:
2,3,4
I want to extract each element of this above list. That is, I want to extract 2, then 3 and finally 4.
I want to do this for each Var[i] and X as well Y.
I was trying to do this just for 1 cell:
(df$Var1[1])[1]
So that I get 1 only. But it was giving me "1,2,3".