Showing 3 of 9 files from the diff.

@@ -1,11 +1,15 @@
Loading
1 1
#################
2 -
#' A cache-aware pipe that does not mask with \code{\%>\%}
2 +
#' A cache-aware pipe (currently not working)
3 3
#'
4 4
#' @description
5 5
#' \if{html}{\figure{lifecycle-experimental.svg}{options: alt="experimental"}}
6 6
#'
7 +
#' With updates to \code{magrittr} to version 2.0, this Cache pipe is now broken.
8 +
#' We are working on an update.
9 +
#'
7 10
#' This pipe can only be used at any point in a pipe chain, but must
8 -
#' be preceded by \code{Cache(...)} (which allows other \code{Cache() \%C\% ... remaining pipes}
11 +
#' be preceded by \code{Cache(...)} (which allows other \code{Cache()
12 +
#' \%C\% ... remaining pipes}
9 13
#' arguments to be passed).
10 14
#'
11 15
#' This will take the input arguments of the first function immediately following
@@ -28,8 +32,9 @@
Loading
28 32
#' @rdname pipe
29 33
#'
30 34
#' @examples
35 +
#' # THIS IS CURRENTLY BROKEN DUE TO UPGRADES TO INTERNALS OF magrittr %>%
31 36
#' library(magrittr) # standard pipe
32 -
#' # dontrun{ # these can't be automatically run due to package conflicts with magrittr
37 +
#' \dontrun{ # these can't be automatically run due to package conflicts with magrittr
33 38
#' tmpdir <- file.path(tempdir(), "testCache")
34 39
#' checkPath(tmpdir, create = TRUE)
35 40
#' a <- rnorm(10, 16) %>%
@@ -93,8 +98,9 @@
Loading
93 98
#' sum(b1 - b2) # 0 # i.e., numbers are same
94 99
#'
95 100
#' unlink(tmpdir, recursive = TRUE)
96 -
#' #}
101 +
#' }
97 102
`%C%` <- function(lhs, rhs) {
103 +
  stop("This %C% is currently broken due to magrittr 2.0 updates; working on a fix")
98 104
  # adapted from magrittr code below
99 105
  parent <- parent.frame()
100 106
  env <- new.env(parent = parent)

@@ -96,7 +96,6 @@
Loading
96 96
}
97 97
98 98
.CacheFn1 <- function(FUN, scalls) {
99 -
100 99
  if (!is(FUN, "function")) {
101 100
    # scalls <- sys.calls()
102 101
    if (any(startsWith(as.character(scalls), "function_list[[k"))) {

@@ -64,11 +64,10 @@
Loading
64 64
#'
65 65
#' # All same
66 66
#' ranNumsB <- Cache(rnorm, 10, 16, cacheRepo = tmpDir) # recovers cached copy
67 -
#' ranNumsC <- Cache(cacheRepo = tmpDir) %C% rnorm(10, 16)  # recovers cached copy
68 67
#' ranNumsD <- Cache(quote(rnorm(n = 10, 16)), cacheRepo = tmpDir) # recovers cached copy
69 68
#'
70 69
#' # Any minor change makes it different
71 -
#' ranNumsE <- Cache(cacheRepo = tmpDir) %C% rnorm(10, 6)# different
70 +
#' ranNumsE <- Cache(rnorm, 10, 6, cacheRepo = tmpDir) # different
72 71
#'
73 72
#' ## Example 1: basic cache use with tags
74 73
#' ranNumsA <- Cache(rnorm, 4, cacheRepo = tmpDir, userTags = "objectName:a")
Files Coverage
R 65.51%
Project Totals (25 files) 65.51%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading