dgrtwo / widyr

Compare 3e800ac ... +3 ... c5966f9

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -88,20 +88,22 @@
Loading
88 88
    if (!sparse) {
89 89
      if (!is.null(maximum_size)) {
90 90
        matrix_size <- (length(unique(tbl[[row]])) *
91 -
                        length(unique(tbl[[column]])))
91 +
                          length(unique(tbl[[column]])))
92 92
        if (matrix_size > maximum_size) {
93 -
          stop("Size of acast matrix, ", matrix_size,
94 -
               " will be too large. Set maximum_size = NULL to avoid ",
95 -
               "this error (make sure your memory is sufficient), ",
96 -
               "or consider using sparse = TRUE.")
93 +
          rlang::abort(
94 +
            paste0("Size of acast matrix, ", matrix_size,
95 +
                   " will be too large. Set maximum_size = NULL to avoid ",
96 +
                   "this error (make sure your memory is sufficient), ",
97 +
                   "or consider using sparse = TRUE.")
98 +
          )
97 99
        }
98 100
      }
99 101
100 102
      form <- stats::as.formula(paste(row, column, sep = " ~ "))
101 103
102 104
      input <- reshape2::acast(tbl, form, value.var = value, fill = 0)
103 105
    } else {
104 -
      input <- tidytext::cast_sparse_(tbl, row, column, value)
106 +
      input <- tidytext::cast_sparse(tbl, !!row, !!column, !!value)
105 107
    }
106 108
    output <- purrr::as_mapper(.f)(input, ...)
107 109
@@ -123,7 +125,7 @@
Loading
123 125
#' @noRd
124 126
custom_melt <- function(m) {
125 127
  if (inherits(m, "data.frame")) {
126 -
    stop("Output is a data frame: don't know how to fix")
128 +
    rlang::abort("Output is a data frame: don't know how to fix")
127 129
  }
128 130
  if (inherits(m, "matrix")) {
129 131
    ret <- reshape2::melt(m, varnames = c("item1", "item2"), as.is = TRUE)

@@ -19,12 +19,12 @@
Loading
19 19
#' @examples
20 20
#'
21 21
#' library(dplyr)
22 -
#' dat <- data_frame(group = rep(1:5, each = 2),
23 -
#'                   letter = c("a", "b",
24 -
#'                              "a", "c",
25 -
#'                              "a", "c",
26 -
#'                              "b", "e",
27 -
#'                              "b", "f"))
22 +
#' dat <- tibble(group = rep(1:5, each = 2),
23 +
#'               letter = c("a", "b",
24 +
#'                          "a", "c",
25 +
#'                          "a", "c",
26 +
#'                          "b", "e",
27 +
#'                          "b", "f"))
28 28
#'
29 29
#' # count the number of times two letters appear together
30 30
#' pairwise_count(dat, letter, group)

@@ -22,12 +22,12 @@
Loading
22 22
#'
23 23
#' library(dplyr)
24 24
#'
25 -
#' dat <- data_frame(group = rep(1:5, each = 2),
26 -
#'                   letter = c("a", "b",
27 -
#'                              "a", "c",
28 -
#'                              "a", "c",
29 -
#'                              "b", "e",
30 -
#'                              "b", "f"))
25 +
#' dat <- tibble(group = rep(1:5, each = 2),
26 +
#'               letter = c("a", "b",
27 +
#'                          "a", "c",
28 +
#'                          "a", "c",
29 +
#'                          "b", "e",
30 +
#'                          "b", "f"))
31 31
#'
32 32
#' # how informative is each letter about each other letter
33 33
#' pairwise_pmi(dat, letter, group)

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R 0.16% 65.57%
Project Totals (11 files) 65.57%
Loading