[R] pmin behavior change in 2.0.0
Brian Bielinski
Brian.Bielinski at trafalgarcapital.com
Fri Nov 5 16:19:11 CET 2004
Hi,
In 2.0.0 the behavior of pmin has changed.
It stops now with an error if all the elements
at a particular point are NA.
These examples were run on windows xp, but the behavior
for 2.0.0 is the same on linux.
R 1.9.1
> pmin(c(1,NA,3),c(1,NA,2))
[1] 1 NA 2
> pmin(c(1,NA,3),c(1,2,2))
[1] 1 NA 2
> pmin(c(1,NA,3),c(1,NA,2),na.rm=TRUE)
[1] 1 NA 2
>
R 2.0.0
> pmin(c(1,NA,3),c(1,NA,2))
Error: NAs are not allowed in subscripted assignments
> pmin(c(1,NA,3),c(1,2,2))
[1] 1 NA 2
> pmin(c(1,NA,3),c(1,NA,2),na.rm=TRUE)
Error: NAs are not allowed in subscripted assignments
>
Is this intentional?
Regards,
Brian
More information about the R-help
mailing list