50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

distrr (version 0.0.6)

dcc6: Data cube creation

Description

Data cube creation

Usage

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

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab