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", pre = { }, aes_form = y ~ x, extras = alist(),
note = NULL, aesthetics = aes(), inherit.aes = TRUE,
check.aes = TRUE, data = NULL, layer_fun = ggplot2::layer)
The geom to use for the layer (may be specified as a string).
The position function to use for the layer (may be specified as a string).
The stat function to use for the layer (may be specified as a string).
code to run as a "pre-process".
A single formula or a list of formulas specifying
how attributes are inferred from the formula. Use NULL
if the
function may be used without a formula.
An alist of additional arguments (potentially with defaults)
A note to add to the quick help.
Additional aesthetics (typically created using
ggplot2::aes()
) set rather than inferred from formula.
gf_dhistogram()
uses this to set the y aesthetic to stat(density)
,
for example.
A logical indicating whether aesthetics should be inherited from prior layers.
A logical indicating whether a warning should be emited when aesthetics provided don't match what is expected.
A data frame or NULL
or NA
.
The function used to create the layer.
A function.