## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0 ✔ purrr 0.3.5
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.5.0
## ✔ readr 2.1.3 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ ggplot2::%+%() masks psych::%+%()
## ✖ ggplot2::alpha() masks psych::alpha()
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
##
## Attaching package: 'kableExtra'
##
##
## The following object is masked from 'package:dplyr':
##
## group_rows
##
##
##
## Attaching package: 'scales'
##
##
## The following object is masked from 'package:purrr':
##
## discard
##
##
## The following object is masked from 'package:readr':
##
## col_factor
##
##
## The following objects are masked from 'package:psych':
##
## alpha, rescale
##
##
## Welcome to tidystats 0.5.1.
## This is a small bug fix update.
##
## Suggested APA citation: Thériault, R. (2022). rempsyc: Convenience functions for psychology
## (R package version 0.1.1) [Computer software]. https://rempsyc.remi-theriault.com
ggplot(df_summary, aes(x = reorder(name, - Percentage), y = Percentage, fill = name)) +
geom_col() +
theme(axis.text.x = element_text(angle=50, hjust=1, size = 11, family="Times New Roman")) +
theme(axis.title.x = element_blank()) +
theme(axis.title.y = element_text(family="Times New Roman")) +
theme(axis.text.y = element_text(size = 11, family="Times New Roman")) +
theme(plot.title = element_text(hjust = 0.5, size = 15, family="Times New Roman")) +
theme(strip.text = element_text(family="Times New Roman")) +
theme(legend.position = "none") +
geom_text(aes(label = paste0(Percentage, "%"), vjust = -.25, family="Times New Roman")) +
ggtitle("Emotional Challenges") +
xlab("Challenges") +
ylab("Percent of Participants") +
scale_y_continuous(labels = function(x) paste0(x, "%"), limits = c(0, 25)) +
scale_fill_hue()
