mapping: Mapping of x onto y

Description Usage Arguments Value Examples

View source: R/mapping.R

Description

This function returns the distribution of x -> y, i.e., the number of unique y values within each unique x value.

Usage

1
2
mapping(f, data, max_rows = 10, na.rm = FALSE, plot = FALSE,
  kable = FALSE)

Arguments

f

Formula, x ~ y

data

Dataframe containing x and y.

max_rows

Maximum number of rows to print (set to NULL to print all rows).

na.rm

Logical, if TRUE will remove NA values from x, y.

plot

Logical, if TRUE will print a bar chart of mapping.

kable

Logical, if TRUE will print table as a kable for RMarkdown rendering.

Value

A dataframe summarizing the mapping, in knitr::kable format if kable = TRUE. Note that plot produces a plot as a side-effect.

Examples

1
2
data(mtcars)
mapping(mpg ~ cyl, mtcars)

rebelrebel04/xplor documentation built on May 27, 2019, 4:01 a.m.