A cross-tabulation function with output similar to STATA, tidy friendly, with weights if needed. If only one dependent variable crossval() will be recommended; if two, then both variables will be crossed; if three, both variables will be crossed with third as weighted values.
crosstab(df, ..., prow = FALSE, pcol = FALSE, pall = FALSE,
decimals = 2, keep_nas = TRUE, total = TRUE, order = TRUE)
Data.frame.
Variables. Dependent and independent variables. If needed, third value should be the weight variable.
Boolean. Calculate percent values for rows, columns, or the whole table, respectively.
Integer. How many decimals should be returned?
Boolean. Keep NAs and count them as well?
Boolean. Return total values column?
Boolean. Sort columns and rows by frequencies? Else, will be sorted alphabetically.
Other Exploratory: corr_cross
,
corr_var
, df_str
,
distr
, freqs_df
,
freqs
, gain_lift
,
get_tweets
, missingness
,
plot_cats
, plot_df
,
plot_nums
, tree_var
,
trendsRelated