[R] Split column
Lisaj
lisajca at gmail.com
Tue Nov 24 16:51:49 CET 2009
Hello, R users,
I have a dataset that looks like this:
id var1 var2
1 1 3
2 3 1
3 2 1
4 1 2
5 2 3
I want to split one column to two columns with 1 = 1 and 1, 2 = 1 and 2, 3 =
2 and 2:
id var1.1 var1.2 var2.1 var2.2
1 1 1 2 2
2 2 2 1 1
3 1 2 1 1
4 1 1 1 2
5 1 2 2 2
Can anyone please help how to get this done? Thanks a lot in advance
Lisa
--
View this message in context: http://old.nabble.com/Split-column-tp26498361p26498361.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list