build_opts_wrapper: Wrap options building process

Description Usage Arguments Value

View source: R/opts.R

Description

When building default options, a common sequence is 1) build the layers list, 2) build the aesthetics list, and then 3) build the opts list. This encapsulates this process.

Usage

1
2
3
build_opts_wrapper(mvar_table, layers_list = "point", x = "axis_1",
  y = "axis_2", col = NULL, fill = NULL, shape = NULL, size = NULL,
  label = NULL, facet_vector = NULL, ...)

Arguments

mvar_table

The mvar_table that we would like to plot.

x

The column name specifying the x-axis in the ordination. Defaults to axis_1 for each coord object in the mvar.

y

The column name specifying the y-axis in the ordination. Defaults to axis_2 for each coord object in the mvar.

col

The color to use for points or text in the plot. This can either be a column in one or more of the annotation objects, in which case the values from that annotation will be used for coloring, or a string specifying the actual color to use.

shape

The points to use for points in the plot. This can either be a column in one or more of the annotation objects, in which case the values from that annotation will be used for coloring, or a string specifying the actual color to use.

size

The size of points in the plot. This can either be a column in one or more of the annotation objects, in which case the values from that annotation will be used for coloring, or a string specifying the actual color to use.

label

The label to use for text in the plot. This can either be a column in one or more of the annotation objects, in which case the values from that annotation will be used for coloring, or a string specifying the actual color to use.

facet_vector

A vector containing column names in the annotation data to use for faceting.

...

Other arguments passed on to layer. These are often aesthetics, used to set an aesthetic to a fixed value. They may also be parameters to the paired geom/stat.

Value

Two lists containing the aes and non aes options. Both lists have length given by the number layers in the mvar object. The i^th component contains directions for plotting the i^th layer. The aes list contains options that are column names in the corresponding annotation, the non-aes components are not in the data annotation.


krisrs1128/mvarVis documentation built on Oct. 13, 2019, 11:14 p.m.