.@gmail.com]
> Sent: Thursday, December 14, 2017 10:29 AM
> To: DIGHE, NILESH [AG/2362] <nilesh.di...@monsanto.com>
> Cc: r-help <r-help@r-project.org>
> Subject: Re: [R] help with recursive function
>
> If you are trying to understand why the "stopifnot" condit
.
Nilesh
From: William Dunlap [mailto:wdun...@tibco.com]
Sent: Thursday, December 14, 2017 11:26 AM
To: DIGHE, NILESH [AG/2362] <nilesh.di...@monsanto.com>
Cc: Eric Berger <ericjber...@gmail.com>; r-help <r-help@r-project.org>
Subject: Re: [R] help with recursive function
Sent: Thursday, December 14, 2017 10:29 AM
> To: DIGHE, NILESH [AG/2362] <nilesh.di...@monsanto.com>
> Cc: r-help <r-help@r-project.org>
> Subject: Re: [R] help with recursive function
>
> If you are trying to understand why the "stopifnot" condition is met yo
] <nilesh.di...@monsanto.com>
Cc: r-help <r-help@r-project.org>
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 y
ot;, "treatment"),
>>
>> "\\.") %>% spread(treatment, value) %>% mutate(outlier = NA)
>>
>> stopifnot(!(any(data1$norm_sd >= 1)))
>>
>> if (!(any(data1$norm_sd >= 1))) {
>>
>> df1 <
gt; return(df1)
>
> }
>
>else {
>
> df2 <- recursive_funlp()
>
> return(df2)
>
> }
>
> }
>
> df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>
> df3
>
> }
>
&
recursive_funlp(dataset = dat1, func = funlp2)
df3
}
From: DIGHE, NILESH [AG/2362]
Sent: Thursday, December 14, 2017 9:01 AM
To: 'Eric Berger' <ericjber...@gmail.com>
Cc: r-help <r-help@r-project.org>
Subject: RE: [R] help with recursive function
Eric: Thanks for taking
ic Berger [mailto:ericjber...@gmail.com]
Sent: Thursday, December 14, 2017 8:17 AM
To: DIGHE, NILESH [AG/2362] <nilesh.di...@monsanto.com>
Cc: r-help <r-help@r-project.org>
Subject: Re: [R] help with recursive function
My own typo ... whoops ...
!( any(dat2$norm_sd >= 1 ))
On Thu,
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
>
>
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]
Hi, I need some help with running a recursive function. I like to run funlp2
recursively.
When I try to run recursive function in another function named "calclp" I get
this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".
I have never built a recursive function before so having trouble executing
11 matches
Mail list logo