Can someone remind me how to change the columns in df.a into a two column df.b that contains one column of data and another column of the original column headings as levels.
Example: a=1:3 b=4:6 c=7:9 df.a=data.frame(a,b,c) Should become in df.b: dat lev 1 a 2 a 3 a 4 b 5 b 6 b 7 c 8 c 9 c Thanks. ______________________________________________ [email protected] 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.
