plotup | R Documentation |
Returns a ggplot object of a specific graphic explicitly called by name from the ones included in the specimens
plotup(data, vars, diagram, output = "plots pane", dir = tempdir())
data |
Data.frame. Default dataset to use for plot. If not already a data.frame, it should be first coerced to by [as.data.frame()]. |
vars |
Character. A variable within the dataset. |
diagram |
Character. A specific graphic to be presented within the ones considered by the 'logical', 'ordered', 'factor', 'character', 'datetime' and 'numeric' arguments of the 'wideplot()' function. |
output |
Character. Type of output.
|
dir |
Directory in which the files are stored. |
This function returns a c('gg', 'ggplot') object, but if the 'output' argument is set to it 'html' or 'console', the function cause a side-effect: either creating and displaying a temporary html file, or printing the ggplot2 code to the console.
Specimens of graphics for univariate and bivariate data.
plotup(iris, "Petal.Width", "color heatmap") plotup(iris, "Petal.Width", "color heatmap", output = "console") if (interactive()) { plotup(iris, "Petal.Width", "color heatmap", output = "html") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.