vis_distr: Plot a distribution

Description Usage Arguments Details Examples

View source: R/low-level-interface-distr.R

Description

Functions to create a distribution plot to be sent to the console or written to a file.

Usage

1
2
3
4
5
vis_distr(data, aes, name = aes, geom = NULL, fill = "gray60", ...)

vis_1d_distr(data, aes, name = aes, geom = NULL, fill = "gray60", ...)

vis_2d_distr(data, aes, name = aes, geom = NULL, fill = "gray60", ...)

Arguments

data

A data frame with data to visualize.

aes

A string to indicate the column for which a distribution should be shown.

name

The name of the variable to plot. If NULL (the default), the name is inferred form aes.

geom

The bare name of the geom to use. If NULL (the default), it is determined by the class of the data to plot.

fill

The color to fill the density area with.

...

Passed to the geom. See 'Details'.

Details

All functions documented here are just a forwarder to vis_distr and the reason for their existence is because when used as an input to vis_cols, the dimensions of the output can be derived from the name of the transformer, so the argument k_dimensional does not have to be specified. If the column has not the target class, you can convert one or multiple columns easily with transform_cols().

Examples

1
2
3
4
vis_1d_distr(mtcars, aes = "cyl") %>%
  flatten_gg()
vis_distr(mtcars, aes = c("cyl", "vs")) %>%
  flatten_gg()

lorenzwalthert/simplificar documentation built on May 7, 2019, 9:32 a.m.