[R]  How to create a new data.frame based on calculation of subsets of an existing data.frame
    Ioannou, Ioanna 
    |o@nn@@|o@nnou @end|ng |rom uc|@@c@uk
       
    Fri Dec 20 14:45:50 CET 2019
    
    
  
Hello Jim,
I made some changes to the code essentially I substitute each 4 lines DS1-4 with one. I estimate VC which in an ideal world should be a matrix with 4 columns one for every exceedance_probability_1-4 and 2 rowsfor each unique combination of taxonomy and IM.Type. Coukd you please check the code I sent last and based on that give your solution?
Many thanks.
Get Outlook for Android<https://aka.ms/ghei36>
________________________________
From: Jim Lemon <drjimlemon using gmail.com>
Sent: Friday, December 20, 2019 11:40:28 AM
To: Ioannou, Ioanna <ioanna.ioannou using ucl.ac.uk>
Cc: r-help mailing list <r-help using r-project.org>
Subject: Re: [R] How to create a new data.frame based on calculation of subsets of an existing data.frame
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?
>
	[[alternative HTML version deleted]]
    
    
More information about the R-help
mailing list