The R Project SVN R

Rev

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

Rev 22734 Rev 26182
Line 1... Line 1...
1
 
1
 
2
R : Copyright 2003, The R Development Core Team
2
R : Copyright 2003, The R Development Core Team
3
Version 1.7.0 Under development (unstable) (2003-01-16)
3
Version 1.8.0 alpha (2003-09-11)
4
 
4
 
5
R is free software and comes with ABSOLUTELY NO WARRANTY.
5
R is free software and comes with ABSOLUTELY NO WARRANTY.
6
You are welcome to redistribute it under certain conditions.
6
You are welcome to redistribute it under certain conditions.
7
Type `license()' or `licence()' for distribution details.
7
Type 'license()' or 'licence()' for distribution details.
8
 
8
 
9
R is a collaborative project with many contributors.
9
R is a collaborative project with many contributors.
10
Type `contributors()' for more information.
10
Type 'contributors()' for more information.
11
 
11
 
12
Type `demo()' for some demos, `help()' for on-line help, or
12
Type 'demo()' for some demos, 'help()' for on-line help, or
13
`help.start()' for a HTML browser interface to help.
13
'help.start()' for a HTML browser interface to help.
14
Type `q()' to quit R.
14
Type 'q()' to quit R.
15
 
15
 
16
> ###---- ALL tests here should return  TRUE !
16
> ###---- ALL tests here should return  TRUE !
17
> ###
17
> ###
18
> ###---- "Real" Arithmetic; Numerics etc  -->  ./arith-true.R
18
> ###---- "Real" Arithmetic; Numerics etc  -->  ./arith-true.R
19
> 
19
> 
Line 227... Line 227...
227
> format(as.POSIXct(relR120 <- "2000-12-15 11:24:40")) == relR120
227
> format(as.POSIXct(relR120 <- "2000-12-15 11:24:40")) == relR120
228
[1] TRUE
228
[1] TRUE
229
> format(as.POSIXct(substr(relR120,1,10))) == substr(relR120,1,10)
229
> format(as.POSIXct(substr(relR120,1,10))) == substr(relR120,1,10)
230
[1] TRUE
230
[1] TRUE
231
> 
231
> 
-
 
232
> ## rank() with NAs (and ties)
-
 
233
> x <- c(3:1,6,4,3,NA,5,0,NA)
-
 
234
> rx <-  rank(x)
-
 
235
> all(rx == c(4.5, 3:2, 8, 6, 4.5, 9, 7, 1, 10))
-
 
236
[1] TRUE
-
 
237
> rxK <- rank(x, na = "keep")
-
 
238
> all(rx [rx <= 8]    == na.omit(rxK))
-
 
239
[1] TRUE
-
 
240
> all(rank(x, na= NA) == na.omit(rxK))
-
 
241
[1] TRUE
-
 
242
>