Compare 84d3687 ... +2 ... 9696be8

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.


@@ -49,33 +49,33 @@
Loading
49 49
50 50
  ulm <-
51 51
    mapdata %>%
52 -
    magrittr::extract2("monetary") %>%
52 +
    extract2("monetary") %>%
53 53
    max() %>%
54 54
    ceiling(.)
55 55
56 56
  llm <-
57 57
    mapdata %>%
58 -
    magrittr::extract2("monetary") %>%
58 +
    extract2("monetary") %>%
59 59
    min() %>%
60 60
    floor(.)
61 61
62 62
  bins <-
63 63
    mapdata %>%
64 -
    magrittr::use_series(frequency_score) %>%
64 +
    use_series(frequency_score) %>%
65 65
    max()
66 66
67 67
  guide_breaks <-
68 68
    seq(llm, ulm, length.out = bins) %>%
69 69
    round()
70 70
71 71
  p <-
72 -
    ggplot2::ggplot(data = mapdata) +
73 -
    ggplot2::geom_tile(ggplot2::aes(x = frequency_score, y = recency_score, fill = monetary)) +
74 -
    ggplot2::scale_fill_gradientn(limits = c(llm, ulm),
72 +
    ggplot(data = mapdata) +
73 +
    geom_tile(aes(x = frequency_score, y = recency_score, fill = monetary)) +
74 +
    scale_fill_gradientn(limits = c(llm, ulm),
75 75
                         colours = RColorBrewer::brewer.pal(n = brewer_n, name = brewer_name),
76 76
                         name = legend_title) +
77 -
    ggplot2::ggtitle(plot_title) + ggplot2::xlab(xaxis_title) + ggplot2::ylab(yaxis_title) +
78 -
    ggplot2::theme(plot.title = ggplot2::element_text(hjust = plot_title_justify))
77 +
    ggtitle(plot_title) + xlab(xaxis_title) + ylab(yaxis_title) +
78 +
    theme(plot.title = element_text(hjust = plot_title_justify))
79 79
80 80
  if (print_plot) {
81 81
    print(p)
@@ -132,14 +132,14 @@
Loading
132 132
133 133
  p <-
134 134
    rfm_hist_data(rfm_table) %>%
135 -
    ggplot2::ggplot(ggplot2::aes(score)) +
136 -
    ggplot2::geom_histogram(bins = hist_bins, fill = hist_color) +
137 -
    ggplot2::ylab(yaxis_title) + ggplot2::ggtitle(plot_title) + ggplot2::xlab(xaxis_title) +
138 -
    ggplot2::facet_grid(. ~ rfm, scales = "free_x",
139 -
      labeller = ggplot2::labeller(
135 +
    ggplot(aes(score)) +
136 +
    geom_histogram(bins = hist_bins, fill = hist_color) +
137 +
    ylab(yaxis_title) + ggtitle(plot_title) + xlab(xaxis_title) +
138 +
    facet_grid(. ~ rfm, scales = "free_x",
139 +
      labeller = labeller(
140 140
        rfm = c(amount = hist_m_label, recency_days = hist_r_label,
141 141
                transaction_count = hist_f_label))) +
142 -
    ggplot2::theme(plot.title = ggplot2::element_text(hjust = plot_title_justify))
142 +
    theme(plot.title = element_text(hjust = plot_title_justify))
143 143
144 144
  if (print_plot) {
145 145
    print(p)
@@ -185,17 +185,17 @@
Loading
185 185
186 186
  p <-
187 187
    rfm_barchart_data(rfm_table) %>%
188 -
    ggplot2::ggplot() +
189 -
    ggplot2::geom_bar(ggplot2::aes(x = monetary_score), fill = bar_color) +
190 -
    ggplot2::facet_grid(recency_score ~ frequency_score) +
191 -
    ggplot2::scale_y_continuous(sec.axis = ggplot2::sec_axis(~ ., name = sec_yaxis_title)) +
192 -
    ggplot2::xlab(xaxis_title) + ggplot2::ylab(" ") + ggplot2::ggtitle(sec_xaxis_title) +
193 -
    ggplot2::theme(
194 -
      plot.title = ggplot2::element_text(
188 +
    ggplot() +
189 +
    geom_bar(aes(x = monetary_score), fill = bar_color) +
190 +
    facet_grid(recency_score ~ frequency_score) +
191 +
    scale_y_continuous(sec.axis = sec_axis(~ ., name = sec_yaxis_title)) +
192 +
    xlab(xaxis_title) + ylab(" ") + ggtitle(sec_xaxis_title) +
193 +
    theme(
194 +
      plot.title = element_text(
195 195
        face = "plain", size = 11, hjust = 0.5
196 196
      ),
197 -
      axis.text.y = ggplot2::element_blank(),
198 -
      axis.ticks.y = ggplot2::element_blank()
197 +
      axis.text.y = element_blank(),
198 +
      axis.ticks.y = element_blank()
199 199
    )
200 200
201 201
  if (print_plot) {
@@ -248,26 +248,26 @@
Loading
248 248
249 249
  data <-
250 250
    rfm_table %>%
251 -
    magrittr::use_series(rfm) %>%
251 +
    use_series(rfm) %>%
252 252
    dplyr::count(transaction_count)
253 253
254 254
  ylim_max <-
255 255
    data %>%
256 256
    dplyr::pull(n) %>%
257 257
    max() %>%
258 -
    magrittr::multiply_by(1.1) %>%
258 +
    multiply_by(1.1) %>%
259 259
    ceiling(.)
260 260
261 261
  p <-
262 262
    data %>%
263 -
    ggplot2::ggplot(ggplot2::aes(x = transaction_count, y = n)) +
264 -
    ggplot2::geom_bar(stat = "identity", fill = bar_color) +
265 -
    ggplot2::xlab(xaxis_title) + ggplot2::ylab(yaxis_title) + ggplot2::ylim(0, ylim_max) +
266 -
    ggplot2::ggtitle(plot_title) +
267 -
    ggplot2::geom_text(
268 -
      ggplot2::aes(label = n, y = n + 3), position = ggplot2::position_dodge(0.9), vjust = 0
263 +
    ggplot(aes(x = transaction_count, y = n)) +
264 +
    geom_bar(stat = "identity", fill = bar_color) +
265 +
    xlab(xaxis_title) + ylab(yaxis_title) + ylim(0, ylim_max) +
266 +
    ggtitle(plot_title) +
267 +
    geom_text(
268 +
      aes(label = n, y = n + 3), position = position_dodge(0.9), vjust = 0
269 269
    ) +
270 -
    ggplot2::theme(plot.title = ggplot2::element_text(hjust = 0.5))
270 +
    theme(plot.title = element_text(hjust = 0.5))
271 271
272 272
  if (print_plot) {
273 273
    print(p)
@@ -316,10 +316,10 @@
Loading
316 316
317 317
  p <-
318 318
    rfm_table %>%
319 -
    magrittr::use_series(rfm) %>%
320 -
    ggplot2::ggplot() +
321 -
    ggplot2::geom_point(ggplot2::aes(x = amount, y = recency_days), color = point_color) +
322 -
    ggplot2::xlab(xaxis_title) + ggplot2::ylab(yaxis_title) + ggplot2::ggtitle(plot_title)
319 +
    use_series(rfm) %>%
320 +
    ggplot() +
321 +
    geom_point(aes(x = amount, y = recency_days), color = point_color) +
322 +
    xlab(xaxis_title) + ylab(yaxis_title) + ggtitle(plot_title)
323 323
324 324
  if (print_plot) {
325 325
    print(p)
@@ -339,10 +339,10 @@
Loading
339 339
340 340
  p <-
341 341
    rfm_table %>%
342 -
    magrittr::use_series(rfm) %>%
343 -
    ggplot2::ggplot() +
344 -
    ggplot2::geom_point(ggplot2::aes(x = amount, y = transaction_count), color = point_color) +
345 -
    ggplot2::xlab(xaxis_title) + ggplot2::ylab(yaxis_title) + ggplot2::ggtitle(plot_title)
342 +
    use_series(rfm) %>%
343 +
    ggplot() +
344 +
    geom_point(aes(x = amount, y = transaction_count), color = point_color) +
345 +
    xlab(xaxis_title) + ylab(yaxis_title) + ggtitle(plot_title)
346 346
347 347
  if (print_plot) {
348 348
    print(p)
@@ -362,10 +362,10 @@
Loading
362 362
363 363
  p <-
364 364
    rfm_table %>%
365 -
    magrittr::use_series(rfm) %>%
366 -
    ggplot2::ggplot() +
367 -
    ggplot2::geom_point(ggplot2::aes(x = transaction_count, y = recency_days), color = point_color) +
368 -
    ggplot2::xlab(xaxis_title) + ggplot2::ylab(yaxis_title) + ggplot2::ggtitle(plot_title)
365 +
    use_series(rfm) %>%
366 +
    ggplot() +
367 +
    geom_point(aes(x = transaction_count, y = recency_days), color = point_color) +
368 +
    xlab(xaxis_title) + ylab(yaxis_title) + ggtitle(plot_title)
369 369
370 370
  if (print_plot) {
371 371
    print(p)

@@ -60,7 +60,7 @@
Loading
60 60
      recency_days = (analysis_date - !! recent_visit) / lubridate::ddays()
61 61
    ) %>%
62 62
    dplyr::select(!! cust_id, recency_days, !! order_count, !! revenues) %>%
63 -
    magrittr::set_names(c("customer_id", "recency_days", "transaction_count", "amount"))
63 +
    set_names(c("customer_id", "recency_days", "transaction_count", "amount"))
64 64
65 65
  result$recency_score   <- NA
66 66
  result$frequency_score <- NA

@@ -8,7 +8,7 @@
Loading
8 8
#'
9 9
rfm_launch_app <- function() {
10 10
11 -
	rlang::inform("`rfm_launch_app()` has been soft-deprecated and will be removed in the next release. In future, to launch the app, run the below code:\n 
11 +
	message("`rfm_launch_app()` has been soft-deprecated and will be removed in the next release. In future, to launch the app, run the below code:\n 
12 12
	- install.packages('xplorerr')\n - xplorerr::app_rfm_analysis()\n")
13 13
14 14
	check_suggests('haven')

@@ -1,16 +1,15 @@
Loading
1 -
#' @importFrom utils packageVersion
2 1
.onAttach <- function(...) {
3 2
4 -
  if (!interactive() || stats::runif(1) > 0.1) return()
3 +
  if (!interactive() || runif(1) > 0.1) return()
5 4
6 -
  pkgs <- utils::available.packages()
5 +
  pkgs <- available.packages()
7 6
8 7
  cran_version <-
9 8
    pkgs %>%
10 -
    magrittr::extract("rfm", "Version") %>%
9 +
    extract("rfm", "Version") %>%
11 10
    package_version()
12 11
13 -
  local_version <- utils::packageVersion("rfm")
12 +
  local_version <- packageVersion("rfm")
14 13
  behind_cran <- cran_version > local_version
15 14
16 15
  tips <- c(
@@ -26,8 +25,8 @@
Loading
26 25
    if (behind_cran) {
27 26
      msg <- c("A new version of rfm is available with bug fixes and new features.")
28 27
      packageStartupMessage(msg, "\nWould you like to install it?")
29 -
      if (utils::menu(c("Yes", "No")) == 1) {
30 -
        utils::update.packages("rfm")
28 +
      if (menu(c("Yes", "No")) == 1) {
29 +
        update.packages("rfm")
31 30
      }
32 31
    } else {
33 32
      packageStartupMessage(paste(strwrap(tip), collapse = "\n"))

@@ -65,7 +65,7 @@
Loading
65 65
      !! cust_id, date_most_recent, recency_days, transaction_count,
66 66
      amount
67 67
    ) %>%
68 -
    magrittr::set_names(c("customer_id", "date_most_recent", "recency_days", "transaction_count", "amount"))
68 +
    set_names(c("customer_id", "date_most_recent", "recency_days", "transaction_count", "amount"))
69 69
70 70
  result$recency_score   <- NA
71 71
  result$frequency_score <- NA

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

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 88.69%
Project Totals (9 files) 88.69%
Loading