dcc6: Data cube creation

Description Usage Arguments Examples

View source: R/dcc_new.R

Description

Data cube creation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
dcc6(
  .data,
  .variables,
  .funs_list = list(n = ~dplyr::n()),
  .total = "Totale",
  order_type = extract_unique4,
  .all = TRUE
)

dcc6_fixed(
  .data,
  .variables,
  .funs_list = list(n = ~dplyr::n()),
  .total = "Totale",
  order_type = extract_unique5,
  .all = TRUE,
  fixed_variable = NULL
)

Arguments

.data

data frame to be processed.

.variables

variables to split data frame by, as a character vector (c("var1", "var2")).

.funs_list

a list of function calls in the form of right-hand formula.

.total

character string with the name to give to the subset of data that includes all the observations of a variable (default: "Totale").

order_type

a function like extract_unique or extract_unique2.

.all

logical, indicating if functions have to be evaluated on the complete dataset.

fixed_variable

name of the variable for which you do not want to estimate the total

Examples

1
2
3
4
5
6
7
8
9
dcc6(invented_wages,
     .variables = c("gender", "sector"), 
     .funs_list = list(n = ~dplyr::n()),
     .all = TRUE)
     
dcc6(invented_wages,
     .variables = c("gender", "sector"), 
     .funs_list = list(n = ~dplyr::n()),
     .all = FALSE)

distrr documentation built on July 14, 2020, 5:06 p.m.