Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

packages can reset digits and corrupt timing

git-svn-id: https://svn.r-project.org/R/trunk@62428 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
commit 33fabbd478c3d4ab1675ed8907e66972428d4480 1 parent e096f5d
ripley authored
View
1  share/R/examples-footer.R
@@ -1,5 +1,6 @@
### * <FOOTER>
###
+options(digits = 7L)
base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
grDevices::dev.off()
###
View
2  src/library/tools/R/check.R
@@ -2077,7 +2077,7 @@ setRlibs <-
}
if (do_timings) {
tfile <- paste0(pkgname, "-Ex.timings")
- times <- read.table(tfile, header = TRUE, row.names = 1)
+ times <- read.table(tfile, header = TRUE, row.names = 1L, colClasses = c("character", rep("numeric", 3)))
o <- order(times[[1]]+times[[2]], decreasing = TRUE)
times <- times[o, ]
keep <- (times[[1]] + times[[2]] > 5) | (times[[3]] > 5)
View
3  src/library/tools/R/testing.R
@@ -57,7 +57,7 @@ massageExamples <-
"function(x) {",
" if(!is.na(x[4L])) x[1L] <- x[1L] + x[4L]",
" if(!is.na(x[5L])) x[2L] <- x[2L] + x[5L]",
- " format(x[1L:3L])",
+ " format(x[1L:3L], digits = 7L)",
"},",
"pos = 'CheckExEnv')\n", sep = "\n", file = out)
}
@@ -100,6 +100,7 @@ massageExamples <-
}
if(addTiming) {
+ options(digits = 7L)
cat("\nbase::assign(\".dptime\", (proc.time() - get(\".ptime\", pos = \"CheckExEnv\")), pos = \"CheckExEnv\")\n", file = out)
cat("base::cat(\"", nm, "\", base::get(\".format_ptime\", pos = 'CheckExEnv')(get(\".dptime\", pos = \"CheckExEnv\")), \"\\n\", file=base::get(\".ExTimings\", pos = 'CheckExEnv'), append=TRUE, sep=\"\\t\")\n", sep = "", file = out)
}
Please sign in to comment.
Something went wrong with that request. Please try again.