Skip to content

Commit 806f818

Browse files
authored
Merge pull request #47 from databio/dev
Release 0.4.2
2 parents 0164779 + 328f16d commit 806f818

File tree

8 files changed

+48
-20
lines changed

8 files changed

+48
-20
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
^paper$
77
.github
88
^_pkgdown\.yaml$
9+
^doc$
10+
^Meta$

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ Thumbs.db
4747
~
4848
.Rproj.user
4949
.Rhistory
50+
/doc/
51+
/Meta/

DESCRIPTION

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: simpleCache
2-
Version: 0.4.1
3-
Date: 2019-02-26
2+
Version: 0.4.2
3+
Date: 2021-04-16
44
Title: Simply Caching R Objects
55
Description: Provides intuitive functions for caching R objects, encouraging
66
reproducible, restartable, and distributed R analysis. The user selects a
@@ -15,11 +15,12 @@ Authors@R: c(person("VP", "Nagraj", email = "vpnagraj@virginia.edu", role =
1515
role = c("aut", "cre")))
1616
Suggests:
1717
knitr,
18+
rmarkdown,
1819
testthat
1920
Enhances: batchtools
2021
VignetteBuilder: knitr
2122
License: BSD_2_clause + file LICENSE
2223
Encoding: UTF-8
23-
URL: https://www.github.com/databio/simpleCache
24-
BugReports: https://www.github.com/databio/simpleCache
25-
RoxygenNote: 6.1.1
24+
URL: https://github.com/databio/simpleCache
25+
BugReports: https://github.com/databio/simpleCache
26+
RoxygenNote: 7.1.1

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change log
22
All notable changes to this project will be documented in this file.
33

4+
## simpleCache [0.4.2] -- 2021-04-16
5+
6+
- updates to accommodate latest knitr for vignettes
7+
48
## simpleCache [0.4.1] -- 2019-02-26
59

610
- fixes unit tests on windows

R/utility.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,26 @@ secToTime = function(timeInSec) {
5151
sprintf("%02.01f", signif(sec, 3)), "s"))
5252
}
5353

54+
ticTocEnv = new.env()
55+
5456
#' Start a timer
5557
#' @param gcFirst Garbage Collect before starting the timer?
5658
#' @param type Type of time to return,
5759
#' can be 'elapsed', 'user.self', or 'sys.self'
5860
tic = function(gcFirst = TRUE, type=c("elapsed", "user.self", "sys.self")) {
5961
type <- match.arg(type)
60-
assign(".type_simpleCache", type, envir=baseenv())
62+
assign(".type_simpleCache", type, envir=ticTocEnv)
6163
if(gcFirst) gc(FALSE)
6264
tic <- proc.time()[type]
63-
assign(".tic_simpleCache", tic, envir=baseenv())
65+
assign(".tic_simpleCache", tic, envir=ticTocEnv)
6466
invisible(tic)
6567
}
6668

6769
#' Check the time since the current timer was started with tic()
6870
toc = function() {
69-
type <- get(".type_simpleCache", envir=baseenv())
71+
type <- get(".type_simpleCache", envir=ticTocEnv)
7072
toc <- proc.time()[type]
71-
tic <- get(".tic_simpleCache", envir=baseenv())
73+
tic <- get(".tic_simpleCache", envir=ticTocEnv)
7274
timeInSec = as.numeric(toc-tic);
7375
message("<", secToTime(timeInSec), ">", appendLF=FALSE)
7476
invisible(toc)

man/simpleCache-package.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/simpleCache.Rd

Lines changed: 20 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/storeCache.Rd

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)