only_joint {distrr} | R Documentation |
Keeps only joint distribution (removes '.total').
Description
Removes all the rows where variables have value .total
.
Usage
only_joint(.cube, .total = "Totale", .variables = NULL)
Arguments
.cube |
a datacube with 'Totale' modalities |
.total |
modality to eliminate (filter out) (default: "Totale") |
.variables |
a character vector with the names of the categorical variables |
Value
a subset of the data cube with only the combinations of all variables modalities, without the "margins".
Examples
data(invented_wages)
str(invented_wages)
vars <- c("gender", "education")
tmp <- dcc2(.data = invented_wages,
.variables = vars,
.fun = jointfun_,
order_type = extract_unique2)
tmp
str(tmp)
only_joint(tmp, .variables = vars)
# Compare dimensions (number of groups)
dim(tmp)
dim(only_joint(tmp, .variables = vars))
[Package distrr version 0.0.6 Index]