dcc6: Data cube creation

View source: R/dcc_new.R

dcc6R Documentation

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

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)


gibonet/distrr documentation built on March 26, 2024, 1:05 a.m.