Hi Ioanna, For simplicity assume that the new data frame will be named E: E<-D[,c("Taxonomy","IM.type",paste("VC,1:4,sep="_"))]
While I haven't tested this, I'm pretty sure I have it correct. Just extract the columns you want from D and assign that to E. Jim On Fri, Dec 20, 2019 at 9:02 PM Ioannou, Ioanna <ioanna.ioan...@ucl.ac.uk> wrote: > > Hello Jim, > > Thank you every so much it ws very helful. In fact what I want to calculate > is the following. My very last question is if I want to save the outcome VC, > IM.type and Taxonomy in a new data.frame how can I do it? > ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.