[R] How to create a new data.frame based on calculation of subsets of an existing data.frame

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Fri Dec 20 12:40:28 CET 2019


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.ioannou using 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?
>



More information about the R-help mailing list