Description Usage Arguments Value Examples
Plots densities of continuous variables, conditioned on quantiles of continuous variables or categories of categorical variables. For categorical variables, boxplots or barplots will be created, depending on whether the variable to be conditioned on is continuous or categorical. Either the user can use a number of same sized quantiles or can select the size of own quantiles
1 2 |
dataset |
A dataframe. |
given_var |
A variable from your |
var_to_plot |
The variables to plot. When not selecting any variable, all variables from your |
n_quantiles |
Number of quantiles you want to partition |
boxplot |
If TRUE, all numerical variables will be presented as boxplots instead of densities. You can also provide a vector with the names of the numerics to show as boxplots if you want to use this option only for a selection of variables. |
selfrange |
Vector of n*2 values or matrix with 2 columns. The first value as min and the second value as max of the self selected quantile. |
remaining |
logical. If TRUE, the remaining values not within selfrange will be plotted to category named 'remaining'. |
Several ggplot graphics. The total number of plots will equal the
number of variables in your dataset
or the amount of variables
selected in var_to_plot
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | n <- 500
number_variables <- 5
set.seed(42)
variables <- as.data.frame(sapply(1:number_variables, function(a) {
if (runif(1) < 0.5) {
rnorm(n)
} else {
rgamma(n, 0.5)
}
}))
plot_GGenemy(variables, "V1")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.