Description Usage Arguments Value Author(s) See Also Examples
These are convenience functions to quickly generate plots for multiple variables, with the variables in the y axis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ggEasyRidge(data,
items = NULL,
labels = NULL,
sortByMean = TRUE,
xlab = NULL,
ylab = NULL)
ggEasyBar(data,
items = NULL,
labels = NULL,
sortByMean = TRUE,
xlab = NULL,
ylab = NULL,
scale_fill_function =
scale_fill_viridis(discrete = TRUE,
guide = guide_legend(title = NULL,
nrow=1)),
fontColor = "white",
fontSize = 2,
labelMinPercentage = 1,
showInLegend = "both",
biAxisLabels = NULL)
|
data |
The dataframe containing the variables. |
items |
The variable names (if not provided, all variables will be used). |
labels |
Labels can optionally be provided; if they are, these will be used instead of the variable names. |
sortByMean |
Whether to sort the variables by mean value. |
xlab, ylab |
The labels for the x and y axes. |
scale_fill_function |
The function to pass to |
fontColor, fontSize |
The color and size of the font used to display the labels |
labelMinPercentage |
The minimum percentage that a category must reach before the label is printed (in whole percentages, i.e., on a scale from 0 to 100). |
showInLegend |
What to show in the legend in addition to the values; nothing (" |
biAxisLabels |
This can be used to specify labels to use if you want to use labels on both the left and right side. This is mostly useful when plotting single questions or semantic differentials. This must be a list with two character vectors, |
A ggplot
plot is returned.
Gjalt-Jorn Peters
Maintainer: Gjalt-Jorn Peters <gjalt-jorn@userfriendlyscience.com>
1 2 3 4 5 6 7 8 9 10 11 12 | ggEasyBar(mtcars, c('gear', 'carb'));
ggEasyRidge(mtcars, c('disp', 'hp'));
### When plotting single questions, if you want to show the anchors:
ggEasyBar(mtcars, c('gear'),
biAxisLabels=list(leftAnchors="Fewer",
rightAnchors="More"));
### Or for multiple questions (for e.g. semantic differentials):
ggEasyBar(mtcars, c('gear', 'carb'),
biAxisLabels=list(leftAnchors=c("Fewer", "Lesser"),
rightAnchors=c("More", "Greater")));
|
Registered S3 method overwritten by 'GGally':
method from
+.gg ggplot2
Registered S3 methods overwritten by 'lme4':
method from
cooks.distance.influence.merMod car
influence.merMod car
dfbeta.influence.merMod car
dfbetas.influence.merMod car
Picking joint bandwidth of 41.9
Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.