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 <drjimle...@gmail.com>
Sent: Friday, December 20, 2019 11:40:28 AM
To: Ioannou, Ioanna <ioanna.ioan...@ucl.ac.uk>
Cc: r-help mailing list <r-help@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.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?
>

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to