vis_cols: Visualize all columns

Description Usage Arguments Examples

View source: R/high-level-interface.R

Description

Visualize all columns

Usage

1
2
3
vis_cols(data, ..., transformer = vis_1d_distr, sub_dir = NULL,
  called_for_side_effects = NULL, k_dimensional = NULL,
  return_vis = FALSE)

Arguments

data

The data to use for plotting.

...

Variables to select. You can use tidy selectors such as starts_with(...), see tidyselect::select_helpers() for details.

transformer

A transformation function that defines the concrete visualization.

sub_dir

The name of the sub-directory under ./simplificar used to save the data under, if you select a transformer with side effects. If set to NULL (the default), the name of the argument data is taken.

called_for_side_effects

Whether or not the function is called for it's side effects. If NULL (the default), this is inferred from transformer. If transformer ends with "file", it is assumed that the function is called only for its side effects and no output to the console is returned.

k_dimensional

The number of dimensions of the plot. If NULL (the default), then it is inferred from transformer in the following way. This works if the transformer is named after the convention [something]_[nd]_[something] whereas [something] may not contain an underscore and n is the number of dimensions. An example of a transformer meeting this requirement is vis_1d_distr().

return_vis

Whether or not the plot should, in addition to being written to a file, be the return value of the function call.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# one aesthetic
vis_cols(mtcars, 2) %>%
  flatten_gg()
vis_cols(mtcars, contains("c"), "vs",
  transformer = vis_distr, k_dimensional = 2
) %>%
 merge_vis()
# all combinations of multiple aesthetics
mtcars %>%
  transform_cols("vs", "as.factor") %>%
  vis_cols(vs, hp, cyl, transformer = vis_2d_point) %>%
  dplyr::slice(1) %>%
  flatten_gg()

dummy_types %>%
  vis_cols(num1, fct1, int1, transformer = vis_2d_distr) %>%
  merge_vis()

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