Skip to content

Commit

Permalink
doc: donttest to avoid CRAN issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrcook committed Mar 26, 2020
1 parent 7e3dc2e commit 83c0545
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
2 changes: 2 additions & 0 deletions R/stash.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#' @return Returns \code{NULL} (invisibly).
#'
#' @examples
#' \donttest{
#' # A value that is used to create `rnd_vals`.
#' x <<- 1e6 # The `<<-` is not normally required, just for this example.
#'
Expand All @@ -20,6 +21,7 @@
#' # Some long running computation.
#' rnd_vals <- rnorm(x)
#' })
#' }
#'
#' @export stash
stash <- function(var, code, depends_on = NULL) {
Expand Down
2 changes: 2 additions & 0 deletions R/unstash.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
#' @return Returns \code{NULL} (invisibly).
#'
#' @examples
#' \donttest{
#' stash("x",
#' {
#' x <- 1
#' })
#'
#' unstash("x")
#' }
#'
#' @export unstash
unstash <- function(var) {
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is a resubmission. I have addressed the following comments from the first a

1. I omitted the redundant "in R" from the title.
2. I added "\value" to the documentation of each function.
3. I removed the "\dontrun{}" statements in the examples for some of the functions.
3. I replaced the "\dontrun{}" statements with "\donttest{}" in the examples for some of the functions.

I was unable to address the final comment: "Please do not modifiy the .GlobalEnv. This is not allowed by the CRAN policies." I am unable to address this because the purpose of the 'mustashe' project is to load stashed values into the global environment. This functionality is very simillar (in fact, derived from) the `cache()` function in 'ProjectTemplate'. In a personal correspondence with the maintainer of 'ProjectTemplate', I found out that they were gradnfathered in when this policy was created. I am hoping an exception can be made for 'mustashe', too.

Expand Down
8 changes: 4 additions & 4 deletions docs/articles/getting-started.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions docs/reference/stash.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions docs/reference/unstash.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/stash.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/unstash.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 83c0545

Please sign in to comment.