Is the following a strange behavior for `mean` vs. `sd` ?

```
$ R --vanilla. ## 4.4.2
> x=c(NA,1,2,3)
> c( mean(x,na.rm=T), sd(x,na.rm=T) )
[1] 2 1
> T=20   ## bad idea for a parameter.  T is also used for TRUE
> c( mean(x,na.rm=T), sd(x,na.rm=T) )
[1] NA  1
>
```

This one was a baffler for me to track down for a few hours...

______________________________________________
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 https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to