The R Project SVN R

Rev

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

Rev 56942 Rev 63206
Line 1... Line 1...
1
## For examples skipped in testing because they are 'random'
1
## For examples skipped in testing because they are 'random'
2
 
2
 
3
set.seed(1)
3
set.seed(1)
4
if(.Platform$OS.type == "windows") options(pager = "console")
4
if(.Platform$OS.type == "windows") options(pager = "console")
5
 
5
 
6
pdf("reg-examples-1.pdf", encoding = "ISOLatin1.enc")
6
pdf("reg-examples1.pdf", encoding = "ISOLatin1.enc")
7
 
7
 
8
 
8
 
9
## base
9
## base
10
example(Cstack_info)
10
example(Cstack_info)
11
example(DateTimeClasses)
11
example(DateTimeClasses)
Line 29... Line 29...
29
example(system.time)
29
example(system.time)
30
example(tempfile)
30
example(tempfile)
31
example(weekdays)
31
example(weekdays)
32
library(help="splines")
32
library(help="splines")
33
 
33
 
-
 
34
## for example(NA)
-
 
35
if(require("microbenchmark")) {
-
 
36
  x <- c(NaN, 1:10000)
-
 
37
  print(microbenchmark(any(is.na(x)), anyNA(x)))
-
 
38
} else { ## much less accurate
-
 
39
  x <- c(NaN, 1e6)
-
 
40
  nSim <- 2^13
-
 
41
  print(rbind(is.na = system.time(replicate(nSim, any(is.na(x)))),
-
 
42
              anyNA = system.time(replicate(nSim, anyNA(x)))))
-
 
43
}
-
 
44
 
34
## utils
45
## utils
35
example(news)
46
example(news)
36
example(packageDescription)
47
example(packageDescription)
37
example(sessionInfo)
48
example(sessionInfo)
38
 
49