[R] ifelse(is.na), with function inside
Daniel Nordlund
djnordlund at verizon.net
Wed Jun 17 21:59:23 CEST 2009
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Grzes
> Sent: Tuesday, June 16, 2009 10:51 PM
> To: r-help at r-project.org
> Subject: Re: [R] ifelse(is.na), with function inside
>
>
> 2 - is.na(a) - it's superb! but I need call a function: wy[i]<-
> ifelse(((is.na(a))), call_fun1(x), call_fun2(x)
>
>
>
Not sure if I understand everything you want to do, but what is wrong with just using
wy <- ifelse(is.na(a), fun1(x), fun2(x))
Hope this is helpful,
Dan
Daniel Nordlund
Bothell, WA USA
More information about the R-help
mailing list