[R] Slight problem in sort
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Wed Aug 6 23:35:15 CEST 2003
Frank E Harrell Jr <fharrell at virginia.edu> writes:
> I get
>
> > sort(c(3,1,NA))
> [1] 1 3
>
> Shouldn't NAs be retained by default?
Not according to the documentation...
sort(x, partial = NULL, na.last = NA, decreasing = FALSE,
method = c("shell", "quick"), index.return = FALSE)
na.last: for controlling the treatment of `NA's. If `TRUE', missing
values in the data are put last; if `FALSE', they are put
first; if `NA', they are removed.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list