vis_to_file: Create a visualization and save it to a file

Description Usage Arguments Value

Description

These functions do exactly what their counterparts without the to_file extension in the function name do, but they save the output to a file. They are called for their side effects only. E.g. vis_1d_distr_to_file() does what vis_1d_distr() does plus saving the output to a file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
vis_distr_to_file(data, aes, name = aes, geom = NULL, fill = "gray60",
  sub_dir = deparse(substitute(data)), file = file_path(pkg_name(), sub_dir,
  time_stamp(name)), dimensions = rep(unit(5, "cm"), 2), device = "pdf",
  return_vis = FALSE, ...)

vis_1d_distr_to_file(data, aes, name = aes, geom = NULL, fill = "gray60",
  sub_dir = deparse(substitute(data)), file = file_path(pkg_name(), sub_dir,
  time_stamp(name)), dimensions = rep(unit(5, "cm"), 2), device = "pdf",
  return_vis = FALSE, ...)

vis_2d_distr_to_file(data, aes, name = aes, geom = NULL, fill = "gray60",
  sub_dir = deparse(substitute(data)), file = file_path(pkg_name(), sub_dir,
  time_stamp(name)), dimensions = rep(unit(5, "cm"), 2), device = "pdf",
  return_vis = FALSE, ...)

vis_point_to_file(data, aes, name = aes,
  sub_dir = deparse(substitute(data)), file = file_path(pkg_name(), sub_dir,
  time_stamp(name)), dimensions = rep(unit(5, "cm"), 2), device = "pdf",
  return_vis = FALSE, ...)

vis_1d_point_to_file(data, aes, name = aes,
  sub_dir = deparse(substitute(data)), file = file_path(pkg_name(), sub_dir,
  time_stamp(name)), dimensions = rep(unit(5, "cm"), 2), device = "pdf",
  return_vis = FALSE, ...)

vis_2d_point_to_file(data, aes, name = aes,
  sub_dir = deparse(substitute(data)), file = file_path(pkg_name(), sub_dir,
  time_stamp(name)), dimensions = rep(unit(5, "cm"), 2), device = "pdf",
  return_vis = FALSE, ...)

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.

sub_dir

The sub-directory to save the plot. merely used to construct the file argument.

file

The path to the file where the visualization should be stored. The file may contain an extension - or the extension can be specified with the device argument.

dimensions

Height and width constructed with grid::unit(), passed to ggplot2::ggsave().

device

The device passed to ggplot2::ggsave().

return_vis

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

...

Passed to the geom. See 'Details'.

Value

Returns the file name to which the visualization was written invisibly.


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