View source: R/plot-statistics-single.R
plot_density | R Documentation |
These functions visualize the distribution of numerical variables via
histograms, density- and ridgeplots. Argument variables
accepts
only values that refer to numerical variables.
plot_density(
df,
variables = NULL,
across = NULL,
across.subset = NULL,
relevel = TRUE,
display.facets = TRUE,
scales = "free",
nrow = NULL,
ncol = NULL,
clrp = "milo",
clrp.adjust = NULL,
verbose = TRUE,
...
)
plot_histogram(
df,
variables = NULL,
across = NULL,
across.subset = NULL,
relevel = TRUE,
scales = "free",
nrow = NULL,
ncol = NULL,
clrp = "milo",
clrp.adjust = NULL,
verbose = TRUE,
...
)
plot_ridgeplot(
df,
variables = NULL,
across = NULL,
across.subset = NULL,
relevel = TRUE,
display.facets = TRUE,
scales = "free",
nrow = NULL,
ncol = NULL,
alpha = 0.85,
clrp = "milo",
clrp.adjust = NULL,
verbose = TRUE,
...
)
df |
A data.frame. |
variables |
Character vector. Specifies the variables of interest. If set to NULL all valid variables of the input data.frame are considered (as long as the total number does not exceeds the limit). If there are more variables you are interested in than they are variables you are not interested in specify those that you are not interested in prefixed with an '-'. Variables prefixed that way are discarded and the remaining are kept. |
across |
Character value. Specifies the discrete variable in the data.frame across which the variables of interest are to be analyzed or displayed. |
across.subset |
Character vector. The groups of interest that the grouping variable
denoted in If there are more groups you are interested in than they are groups you are not interested in specify those that you are not interested in prefixed with an '-'. Variables prefixed that way are discarded and the remaining are kept. |
relevel |
Logical value. If set to TRUE the input order of |
display.facets |
Logical value. Only relevant if |
scales , nrow , ncol |
Given to |
clrp |
Character value. Specifies the color palette to be used to represent
groups of discrete variables. Run |
clrp.adjust |
Named character vector or NULL. If character, it adjusts the colors that are used to represent the groups. Names of the input vector must refer to the group and the respective named element denotes the color with which to represent the group. |
verbose |
Logical. If set to TRUE informative messages regarding the computational progress will be printed. (Warning messages will always be printed.) |
... |
Additional arguments given to the respective |
Returns a ggplot-object that can be additionally customized according to the rules of the ggplot2-framework.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.