[R] "na.pass"

Gabor Grothendieck ggrothendieck at gmail.com
Wed May 31 03:47:28 CEST 2006


Check out the source code to na.pass.  It just returns its first
argument unchanged:

> na.pass
function (object, ...)
object
<environment: namespace:stats>

On 5/30/06, Bahamonde Natalia <bahamonde at lss.supelec.fr> wrote:
> Hello...
>
> What does "na.pass"?
>
>
>    x=c(2.4, 2.4, 1.9, 2.5, 2.1)
>    xNA=replace(x, 3, NA)
>
>    p=c(acf(x, type=c("covariance"), plot=FALSE)$acf)
>    pNA=c(acf(xNA, type=c("covariance"), na.action=na.pass, plot=FALSE)$acf)
>
>  > p
> [1]  0.05040 -0.03112  0.00816  0.00224 -0.00448
>  > pNA
> [1]  0.02250 -0.01167  0.00250 -0.00100 -0.00250
>
> In the manual say "na.pass returns objet unchanged"...
>
> Thanks, Natalia
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



More information about the R-help mailing list