Showing 3 of 4 files from the diff.
Newly tracked file
R/rfm-table-customer.R changed.
Other files ignored by Codecov
NAMESPACE has changed.

@@ -40,13 +40,8 @@
Loading
40 40
#' @export
41 41
#'
42 42
rfm_table_customer <- function(data = NULL, customer_id = NULL, n_transactions = NULL,
43 -
                            recency_days = NULL, total_revenue = NULL, analysis_date = NULL, recency_bins = 5,
44 -
                            frequency_bins = 5, monetary_bins = 5, ...) UseMethod("rfm_table_customer")
45 -
46 -
#' @export
47 -
#'
48 -
rfm_table_customer.default <- function(data = NULL, customer_id = NULL, n_transactions = NULL,
49 -
                                       recency_days = NULL, total_revenue = NULL, analysis_date = NULL, recency_bins = 5,
43 +
                                       recency_days = NULL, total_revenue = NULL, 
44 +
                                       analysis_date = NULL, recency_bins = 5,
50 45
                                       frequency_bins = 5, monetary_bins = 5, ...) {
51 46
52 47
  cust_id     <- deparse(substitute(customer_id))
@@ -63,15 +58,7 @@
Loading
63 58
  colnames(result) <- c("customer_id", "recency_days", "transaction_count", "amount")
64 59
  out <- rfm_prep_bins(result, recency_bins, frequency_bins, monetary_bins, analysis_date)
65 60
66 -
  class(out) <- c("rfm_table_customer", "tibble", "data.frame")
67 61
  return(out)
68 62
69 63
}
70 64
71 -
72 -
73 -
#' @export
74 -
#'
75 -
print.rfm_table_customer <- function(x, ...) {
76 -
  print(x$rfm)
77 -
}

@@ -37,12 +37,6 @@
Loading
37 37
#' @export
38 38
#'
39 39
rfm_table_order <- function(data = NULL, customer_id = NULL, order_date = NULL,
40 -
                      revenue = NULL, analysis_date = NULL, recency_bins = 5,
41 -
                      frequency_bins = 5, monetary_bins = 5, ...) UseMethod("rfm_table_order")
42 -
43 -
#' @export
44 -
#'
45 -
rfm_table_order.default <- function(data = NULL, customer_id = NULL, order_date = NULL,
46 40
                              revenue = NULL, analysis_date = NULL, recency_bins = 5,
47 41
                              frequency_bins = 5, monetary_bins = 5, ...) {
48 42
@@ -53,17 +47,10 @@
Loading
53 47
  result <- rfm_prep_table_data(data, cust_id, odate, reven, analysis_date)
54 48
  out    <- rfm_prep_bins(result, recency_bins, frequency_bins, monetary_bins, analysis_date)
55 49
56 -
  class(out) <- c("rfm_table_order", "tibble", "data.frame")
57 50
  return(out)
58 51
59 52
}
60 53
61 -
#' @export
62 -
#'
63 -
print.rfm_table_order <- function(x, ...) {
64 -
  print(x$rfm)
65 -
}
66 -
67 54
rfm_prep_table_data <- function(data, customer_id, order_date, revenue, analysis_date) {
68 55
69 56
  result <- 

@@ -40,12 +40,6 @@
Loading
40 40
#' @export
41 41
#'
42 42
rfm_table_customer_2 <- function(data = NULL, customer_id = NULL, n_transactions = NULL,
43 -
                            latest_visit_date = NULL, total_revenue = NULL, analysis_date = NULL, recency_bins = 5,
44 -
                            frequency_bins = 5, monetary_bins = 5, ...) UseMethod("rfm_table_customer_2")
45 -
46 -
#' @export
47 -
#'
48 -
rfm_table_customer_2.default <- function(data = NULL, customer_id = NULL, n_transactions = NULL,
49 43
                                       latest_visit_date = NULL, total_revenue = NULL, analysis_date = NULL,
50 44
                                       recency_bins = 5, frequency_bins = 5, monetary_bins = 5, ...) {
51 45
@@ -64,15 +58,6 @@
Loading
64 58
  colnames(result) <- c("customer_id", "recency_days", "transaction_count", "amount")
65 59
  out <- rfm_prep_bins(result, recency_bins, frequency_bins, monetary_bins, analysis_date)
66 60
67 -
  class(out) <- c("rfm_table_customer_2", "tibble", "data.frame")
68 61
  return(out)
69 62
70 63
}
71 -
72 -
73 -
74 -
#' @export
75 -
#'
76 -
print.rfm_table_customer_2 <- function(x, ...) {
77 -
  print(x$rfm)
78 -
}
Files Coverage
R 87.55%
Project Totals (9 files) 87.55%
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