Re: [R] help with recursive function

2017-12-14 Thread William Dunlap via R-help
il.com] > Sent: Thursday, December 14, 2017 10:29 AM > To: DIGHE, NILESH [AG/2362] > Cc: r-help > Subject: Re: [R] help with recursive function > > If you are trying to understand why the "stopifnot" condition is met you > can replace it by something like: > > if (

Re: [R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
. Nilesh From: William Dunlap [mailto:wdun...@tibco.com] Sent: Thursday, December 14, 2017 11:26 AM To: DIGHE, NILESH [AG/2362] Cc: Eric Berger ; r-help Subject: Re: [R] help with recursive function Your code contains the lines stopifnot(!(any(data1$norm_sd >= 1)))

Re: [R] help with recursive function

2017-12-14 Thread William Dunlap via R-help
Sent: Thursday, December 14, 2017 10:29 AM > To: DIGHE, NILESH [AG/2362] > Cc: r-help > Subject: Re: [R] help with recursive function > > If you are trying to understand why the "stopifnot" condition is met you > can replace it by something like: > > if ( any(d

Re: [R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
] Cc: r-help Subject: Re: [R] help with recursive function If you are trying to understand why the "stopifnot" condition is met you can replace it by something like: if ( any(dat2$norm_sd >= 1) ) browser() This will put you in a debugging session where you can examine your va

Re: [R] help with recursive function

2017-12-14 Thread Eric Berger
, >> >> "\\.") %>% spread(treatment, value) %>% mutate(outlier = NA) >> >> stopifnot(!(any(data1$norm_sd >= 1))) >> >> if (!(any(data1$norm_sd >= 1))) { >> >> df1 <- dat1 >> >>

Re: [R] help with recursive function

2017-12-14 Thread Eric Berger
gt; return(df1) > > } > >else { > > df2 <- recursive_funlp() > > return(df2) > > } > > } > > df3 <- recursive_funlp(dataset = dat1, func = funlp2) > > df3 > > } >

Re: [R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
recursive_funlp(dataset = dat1, func = funlp2) df3 } From: DIGHE, NILESH [AG/2362] Sent: Thursday, December 14, 2017 9:01 AM To: 'Eric Berger' Cc: r-help Subject: RE: [R] help with recursive function Eric: Thanks for taking time to look into my problem. Despite of making the ch

Re: [R] help with recursive function

2017-12-14 Thread DIGHE, NILESH [AG/2362]
ic Berger [mailto:ericjber...@gmail.com] Sent: Thursday, December 14, 2017 8:17 AM To: DIGHE, NILESH [AG/2362] Cc: r-help Subject: Re: [R] help with recursive function My own typo ... whoops ... !( any(dat2$norm_sd >= 1 )) On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger mailto:ericjber...@

Re: [R] help with recursive function

2017-12-14 Thread Eric Berger
My own typo ... whoops ... !( any(dat2$norm_sd >= 1 )) On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger wrote: > You seem to have a typo at this expression (and some others like it) > > Namely, you write > > any(!dat2$norm_sd) >= 1 > > when you possibly meant to write > > !( any(dat2$norm_sd) >=

Re: [R] help with recursive function

2017-12-14 Thread Eric Berger
You seem to have a typo at this expression (and some others like it) Namely, you write any(!dat2$norm_sd) >= 1 when you possibly meant to write !( any(dat2$norm_sd) >= 1 ) i.e. I think your ! seems to be in the wrong place. HTH, Eric On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362]