jointfun_: A minimal function which counts the number of observations by...

View source: R/jointfuns.R

jointfun_R Documentation

A minimal function which counts the number of observations by groups in a data frame

Description

A minimal function which counts the number of observations by groups in a data frame

Usage

jointfun_(.data, .variables, ...)

Arguments

.data

data frame to be processed

.variables

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

...

additional function calls to be applied on the .data

Value

a data frame, with a column for each cateogrical variable used, and a row for each combination of all the categorical variables' modalities.

Examples

data("invented_wages")
tmp <- jointfun_(.data = invented_wages, .variables = c("gender", "sector"))
tmp
str(tmp)

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