The R Project SVN R

Rev

Rev 22734 | Rev 41639 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22734 Rev 26182
Line 147... Line 147...
147
is.null(attr(unclass(d1$b), "class"))
147
is.null(attr(unclass(d1$b), "class"))
148
 
148
 
149
## bugs in R 1.2.0
149
## bugs in R 1.2.0
150
format(as.POSIXct(relR120 <- "2000-12-15 11:24:40")) == relR120
150
format(as.POSIXct(relR120 <- "2000-12-15 11:24:40")) == relR120
151
format(as.POSIXct(substr(relR120,1,10))) == substr(relR120,1,10)
151
format(as.POSIXct(substr(relR120,1,10))) == substr(relR120,1,10)
-
 
152
 
-
 
153
## rank() with NAs (and ties)
-
 
154
x <- c(3:1,6,4,3,NA,5,0,NA)
-
 
155
rx <-  rank(x)
-
 
156
all(rx == c(4.5, 3:2, 8, 6, 4.5, 9, 7, 1, 10))
-
 
157
rxK <- rank(x, na = "keep")
-
 
158
all(rx [rx <= 8]    == na.omit(rxK))
-
 
159
all(rank(x, na= NA) == na.omit(rxK))