search for: mc1a

Displaying 1 result from an estimated 1 matches for "mc1a".

Did you mean: mc1
2008 May 19
1
reshape a wide data frame from wide to a long format with metadata columns
...hape" command. I have a data frame consisting of 108 columns that I would like to convert to a long table and remove the metadata (embedded in the column names of the wide table) to new metadata columns in the long format. #example data frame. NOTE column names contain metadata:: mediacont.21.MC1A contains treatment=mediacont, time=21, rep=MC1A data1<-data.frame(cbind(name=0:10, mediacont.21.MC1A=10:20,mediatreat.20.MD1A=30:40, treat.20.T2C=50:60,treat.20.T2A=70:80,condtp.20.C2A=90:100,condtp.20.C2B=100:110, mediacont.21.MC1B=120:130, mediacont.21.MC1B=130:140)) #example of reshape cod...