dot-check_plot_splitting_variables: Checks and sanitizes splitting variables for plotting.

.check_plot_splitting_variablesR Documentation

Checks and sanitizes splitting variables for plotting.

Description

Checks and sanitizes splitting variables for plotting.

Usage

.check_plot_splitting_variables(
  x,
  split_by = NULL,
  color_by = NULL,
  linetype_by = NULL,
  facet_by = NULL,
  x_axis_by = NULL,
  y_axis_by = NULL,
  available = NULL
)

Arguments

x

data.table or data.frame containing the data used for splitting.

split_by

(optional) Splitting variables. This refers to column names on which datasets are split. A separate figure is created for each split. See details for available variables.

color_by

(optional) Variables used to determine fill colour of plot objects. The variables cannot overlap with those provided to the split_by argument, but may overlap with other arguments. See details for available variables.

linetype_by

(optional) Variables that are used to determine the linetype of lines in a plot. The variables cannot overlap with those provided to the split_by argument, but may overlap with other arguments. Sett details for available variables.

facet_by

(optional) Variables used to determine how and if facets of each figure appear. In case the facet_wrap_cols argument is NULL, the first variable is used to define columns, and the remaing variables are used to define rows of facets. The variables cannot overlap with those provided to the split_by argument, but may overlap with other arguments. See details for available variables.

x_axis_by

(optional) Variable plotted along the x-axis of a plot. The variable cannot overlap with variables provided to the split_by and y_axis_by arguments (if used), but may overlap with other arguments. Only one variable is allowed for this argument. See details for available variables.

y_axis_by

(optional) Variable plotted along the y-axis of a plot. The variable cannot overlap with variables provided to the split_by and x_axis_by arguments (if used), but may overlap with other arguments. Only one variable is allowed for this argument. See details for available variables.

available

Names of columns available for splitting.

Details

This internal function allows some flexibility regarding the exact input. Allowed splitting variables should be defined by the available argument.

Value

A sanitized list of splitting variables.


familiar documentation built on Sept. 30, 2024, 9:18 a.m.