View source: R/layer_factory.R
| layer_factory | R Documentation |
Primarily intended for package developers, this function factory is used to create the layer functions in the ggformula package.
layer_factory(
geom = "point",
position = "identity",
stat = "identity",
interactive = FALSE,
layer_func_interactive = "geom_point",
pre = {
},
aes_form = y ~ x,
extras = alist(),
note = NULL,
aesthetics = aes(),
inherit.aes = TRUE,
check.aes = TRUE,
data = NULL,
layer_fun = if (interactive) {
quo(layer_interactive)
} else {
quo(ggplot2::layer)
},
...
)
geom |
The geom to use for the layer (may be specified as a string). |
position |
The position function to use for the layer (may be specified as a string). |
stat |
The stat function to use for the layer (may be specified as a string). |
interactive |
A logical indicating whether this is being used to create an interactive layer. |
layer_func_interactive |
The function used to create the layer when 'interactive“ is TRUE (or a quosure that evaluates to such a function). |
pre |
code to run as a "pre-process". |
aes_form |
A single formula or a list of formulas specifying
how attributes are inferred from the formula. Use |
extras |
An alist of additional arguments (potentially with defaults) |
note |
A note to add to the quick help. |
aesthetics |
Additional aesthetics (typically created using
|
inherit.aes |
A logical indicating whether aesthetics should be inherited from prior layers or a vector of character names of aesthetics to inherit. |
check.aes |
A logical indicating whether a warning should be emited when aesthetics provided don't match what is expected. |
data |
A data frame or |
layer_fun |
function used to create a layer. The default value is anticipated to work in most (all?) cases. |
... |
Additional arguments. |
A function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.