Rev 65884 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
## For examples skipped in testing because they are 'random'set.seed(1)if(.Platform$OS.type == "windows") options(pager = "console")pdf("reg-examples-1.pdf", encoding = "ISOLatin1.enc")## baseexample(Cstack_info)example(DateTimeClasses)example(Dates)example(Ops.Date)example(Random)example(Sys.getpid)example(Sys.sleep)example(Sys.time)example(as.POSIXlt)example(difftime)example(format.Date)example(Reduce) # funprog.Rdexample(gc)example(memory.profile)paste("Today is", date()) # from paste.Rdtrunc(Sys.time(), "day") # from round.POSIXt.Rdexample(srcref)example(strptime)example(sys.parent)example(system.time)example(tempfile)example(weekdays)library(help="splines")## for example(NA)if(require("microbenchmark")) {x <- c(NaN, 1:10000)print(microbenchmark(any(is.na(x)), anyNA(x)))} else { ## much less accuratex <- c(NaN, 1e6)nSim <- 2^13print(rbind(is.na = system.time(replicate(nSim, any(is.na(x)))),anyNA = system.time(replicate(nSim, anyNA(x)))))}## utilsexample(news)example(sessionInfo)## datasetsexample(JohnsonJohnson)example(ability.cov)example(npk)## grDevicesif(.Platform$OS.type == "windows") {example(windowsFonts)} else {example(X11Fonts)example(quartzFonts)}library(tools)example(Rdutils)example(fileutils)## results are location- and OS-specificexample(parseLatex) # charset-specific## part of example(buildVignettes) at one timegVigns <- pkgVignettes("grid")str(gVigns) # contains pathsvind <- system.file(package = "grid", "doc", "index.html")if(nzchar(vind)) { # so vignettes have been installed`%=f=%` <- function(a, b) normalizePath(a) == normalizePath(b)with(gVigns,stopifnot(engines == "utils::Sweave",pkgdir %=f=% system.file(package="grid"),dir %=f=% system.file(package = "grid", "doc"),(n. <- length(docs)) >= 12, # have 13n. == length(names), n. == length(engines),length(msg) == 0) ) # as it is a 'base' packagestopifnot("grid" %in% gVigns$names, inherits(gVigns, "pkgVignettes"))}proc.time()