fn_switch | R Documentation |
Function that allows you to call different functions based upon an aesthetic variable value.
fn_switch(types, mapping_val = "y")
types |
list of functions that follow the |
mapping_val |
mapping value to switch on. Defaults to the 'y' variable of the aesthetics list. |
ggnostic_continuous_fn <- fn_switch(list(
default = ggally_points,
.fitted = ggally_points,
.se.fit = ggally_nostic_se_fit,
.resid = ggally_nostic_resid,
.hat = ggally_nostic_hat,
.sigma = ggally_nostic_sigma,
.cooksd = ggally_nostic_cooksd,
.std.resid = ggally_nostic_std_resid
))
ggnostic_combo_fn <- fn_switch(list(
default = ggally_box_no_facet,
fitted = ggally_box_no_facet,
.se.fit = ggally_nostic_se_fit,
.resid = ggally_nostic_resid,
.hat = ggally_nostic_hat,
.sigma = ggally_nostic_sigma,
.cooksd = ggally_nostic_cooksd,
.std.resid = ggally_nostic_std_resid
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.