Hi,

I have a data set as follow:

X         Z
x1        102
x2        102
x2        102
x2        77
x3        23
 
I need to pivot this data as follows and assign the values based on frequency 
of column Z:

X       Z.102   Z.77 Z.23
x1          1        0        0
x2          21  0
x3         00  1

Thanks.

Best,Farnoosh Sheikhi
        [[alternative HTML version deleted]]

______________________________________________
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