Hi all, I guess this might be an easy question, but I've searched multiple help pages without finding any answear... so now I put my trust in you!
I have a data frame (36 variables and 556 observations). One column contains three factors, and I would like to divide the data frame into three new ones, based on the value of the factors, thereby having only one value for all elements of the particular column in each of the data frames. The reason is that I later will create plots and do statistical analyzes on these data frames, and I don't want those factors affecting the result. ID Weight Age_days ... 1 18 76.1 106 2 19 77.0 175 3 20 78.1 121 4 21 78.2 121 5 22 78.8 106 6 23 76.3 106 . . . I also have another column containing several factors, of which I would like to exclude one (get NA instead). ID Weight Age_days Value_ID ... 1 18 76.1 106 high 2 19 77.0 175 low 3 20 78.1 121 middle 4 21 78.2 121 high 5 22 78.8 106 high 6 23 76.3 106 number <-- exclude 7 24 76.9 175 low . . . I really hope someone could help me, though you might think it's too easy... Best regards, Joel _________________________________________________________________ Hitta kärleken nu i vår! http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952 [[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.