cross_tabs: Evaluate associations between categorical variables

Description Usage Arguments Details Value See Also Examples

View source: R/cross_tabs.R

Description

Evaluate associations between categorical variables

Usage

1
2
3
4
5
6
7
8
cross_tabs(
  dataset,
  var1,
  var2,
  tab = NULL,
  data_filter = "",
  envir = parent.frame()
)

Arguments

dataset

Dataset (i.e., a data.frame or table)

var1

A categorical variable

var2

A categorical variable

tab

Table with frequencies as alternative to dataset

data_filter

Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")

envir

Environment to extract data from

Details

See https://radiant-rstats.github.io/docs/basics/cross_tabs.html for an example in Radiant

Value

A list of all variables used in cross_tabs as an object of class cross_tabs

See Also

summary.cross_tabs to summarize results

plot.cross_tabs to plot results

Examples

1
2
cross_tabs(newspaper, "Income", "Newspaper") %>% str()
table(select(newspaper, Income, Newspaper)) %>% cross_tabs(tab = .)

radiant.basics documentation built on Nov. 18, 2021, 9:07 a.m.