> str(data)
'data.frame':   250 obs. of  3 variables:
 $ student: chr  "A" "B" "C" "D" ...
 $ data   : num  20.2 20.4 22.5 22.1 23.3 ...
 $ param   : Factor w/ 4 levels "AGE","SCHOOL",..: 1 1 1 1 1 1 1 1 1 1


Hi , i would like to split the dataframe so that each level of param is a column
At the end it should look like


        AGE     SCHOOL ...
A       20.2    20.4
B       22.5    22.1
C       23.1    24
D       22      22.8
..


is i use that contingency table:
table(data$student,data$param) i will have such a similar table of what i want, except that i don't need counts but real data.

How can i split levels of the dataframe into columns ??

thanks

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to