Hi! I began with an imported .xlsx survey file which I called NAMST1 from which I selected subscales using brackets as follows:
slf_eff <- NAMST1[c("slf_eff_1","slf_eff_2", "slf_eff_3","slf_eff_4")]
I then wanted to make box plots with ggplot2 however the only code I have been able to successfully get any plot with is the following:
ggplot(stack(slf_eff), aes(ind,y=values)) +
geom_boxplot(outlier.colour = "red", outlier.shape = 16,
outlier.size = 2, notch = FALSE)
## and it still returns the following warning
## Warning message: Removed 16 rows containing non-finite values (stat_boxplot).
I can't seem to understand what aes() needs to map to or why it works with the stack() function but still has an error. I am wondering if it is due to the way I created the subscale groups and if so what is a better solution.
Thank you for you patience.