hafen / trelliscopejs

@@ -28,7 +28,7 @@
Loading
28 28
#'   group_by(manufacturer, class) %>%
29 29
#'   nest() %>%
30 30
#'   mutate(
31 -
#'     cogs = map_cog(data, ~ data_frame(
31 +
#'     cogs = map_cog(data, ~ tibble(
32 32
#'       mean_city_mpg = cog(mean(.$cty), desc = "Mean city mpg"),
33 33
#'       mean_hwy_mpg = cog(mean(.$hwy), desc = "Mean highway mpg"),
34 34
#'       most_common_drv = cog(tail(names(table(.$drv)), 1), desc = "Most common drive type")

@@ -172,7 +172,7 @@
Loading
172 172
#'   nest() %>%
173 173
#'   mutate(
174 174
#'     additional_cogs = map_cog(data,
175 -
#'       ~ data_frame(
175 +
#'       ~ tibble(
176 176
#'         max_city_mpg = cog(max(.x$cty), desc = "Max city mpg"),
177 177
#'         min_city_mpg = cog(min(.x$cty), desc = "Min city mpg"))),
178 178
#'     panel = map_plot(data, ~ figure(xlab = "City mpg", ylab = "Highway mpg") %>%
@@ -234,7 +234,7 @@
Loading
234 234
#'   mutate(
235 235
#'     mod = map(data, ~ lm(Sepal.Length ~ Sepal.Width, data = .x)),
236 236
#'     cogs = map2_cog(data, mod, function(data, mod) {
237 -
#'       data_frame(max_sl = max(data$Sepal.Length), slope = coef(mod)[2])
237 +
#'       tibble(max_sl = max(data$Sepal.Length), slope = coef(mod)[2])
238 238
#'     }),
239 239
#'     panel = map2_plot(data, mod, function(data, mod) {
240 240
#'       figure(xlab = "Sepal.Width", ylab = "Sepal.Length") %>%

@@ -221,13 +221,13 @@
Loading
221 221
#   note: this will only detect first-order sorting...
222 222
find_sort_cols <- function(x) {
223 223
  if (ncol(x) == 0)
224 -
    return(data_frame())
224 +
    return(tibble())
225 225
226 226
  sortable <- names(x)[sapply(x, is.atomic)]
227 227
228 228
  res <- lapply(sortable,
229 229
    function(nm) {
230 -
      res <- data_frame(name = nm, dir = NA)
230 +
      res <- tibble(name = nm, dir = NA)
231 231
      if (!is.unsorted(x[[nm]], na.rm = TRUE)) {
232 232
        res$dir <- "asc"
233 233
      } else if (!is.unsorted(rev(x[[nm]]), na.rm = TRUE)) {

@@ -63,14 +63,14 @@
Loading
63 63
#
64 64
#   ## determine which columns to compute what kind of cognostics for
65 65
#   cog_spec <- list(
66 -
#     count = data_frame(col = NA, cogname = "count", desc = "number of observations")
66 +
#     count = tibble(col = NA, cogname = "count", desc = "number of observations")
67 67
#   )
68 68
#
69 69
#   # if any columns are unique per group, add them as an "identity" cognostic
70 70
#   tmp <- cog_data %>% purrr::map_df(. %>% summarise_all(n_distinct))
71 71
#   unique_cols <- names(tmp)[sapply(tmp, function(x) all(x == 1))]
72 72
#   if (length(unique_cols) > 0) {
73 -
#     cog_spec$unique <- data_frame(
73 +
#     cog_spec$unique <- tibble(
74 74
#       col = unique_cols,
75 75
#       cogname = sanitize(unique_cols),
76 76
#       desc = get_label(cog_data[[1]], unique_cols))
@@ -80,7 +80,7 @@
Loading
80 80
#   num_cols <- names(cog_data[[1]])[sapply(cog_data[[1]], is.numeric)]
81 81
#   num_cols <- setdiff(num_cols, unique_cols)
82 82
#   if (length(num_cols) > 0)
83 -
#     cog_spec$num <- data_frame(
83 +
#     cog_spec$num <- tibble(
84 84
#       col = num_cols,
85 85
#       cogname = paste0(sanitize(num_cols), "_mean"),
86 86
#       desc = paste("mean", get_label(cog_data[[1]], num_cols)))
@@ -90,7 +90,7 @@
Loading
90 90
#   names(cog_desc) <- tmp$cogname
91 91
#
92 92
#   res <- map_cog(cog_data, function(x) {
93 -
#     res <- data_frame(count = nrow(x))
93 +
#     res <- tibble(count = nrow(x))
94 94
#     for (ii in seq_along(cog_spec$unique$col))
95 95
#       res[[cog_spec$unique$cogname[ii]]] <- x[[cog_spec$unique$col[ii]]][1]
96 96
#     for (ii in seq_along(cog_spec$num$col))
Files Coverage
R 75.82%
Project Totals (11 files) 75.82%
1
comment: false
2

3
coverage:
4
  range: "70...95"
5
  status:
6
    patch:
7
      default:
8
        branches:
9
        - master
10
        - dev
11
        target: '80'
12
    project:
13
      default:
14
        branches:
15
        - master
16
        - dev
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