..count.. very nice. I created a similar chart but it was far more complicated. Thank you.
@StatisticsGlobe3 жыл бұрын
Glad it was helpful! Thank you for the comment! :)
@thomascamminga15762 жыл бұрын
Thank you for the video! I was wondering how you can do something similar if you also have groups. When I applied the aes(y = (..count..)/sum(..count..)) code to a grouped barchart, it expresses the percentages of certain categories as relative to the whole sample, but I want to have the percentages of categories relative to the answers of the group. So in other words, I would like to create a graph in which I want to plot for two groups separately the mean percentages of frequencies in different categories. So similar to your graph but then with the two groups next to each other for each category. How can I best achieve this?
@cansustatisticsglobe2 жыл бұрын
Hello Thomas, Thank you for your interest in our tutorials. Sorry for the late response. If I understood your question correctly, you could use the facet_grid() function. Please see the example below. set.seed(927456) # Creating example data data
@maxarendorff65213 жыл бұрын
Great stuff. These videos are very helpful.
@StatisticsGlobe3 жыл бұрын
Glad you like them Max, thank you for the nice comment!
@deniseortiz85672 жыл бұрын
You are GREAT and super helpful thank you!! I'm wondering how to do this with 2 categorical variables. I have looked through multiple videos but only find count with 2 cat vars. Any help from anyone would be appreciated.
@cansustatisticsglobe2 жыл бұрын
Hello Denise, You can use facet_grid as follows: set.seed(927456) # Creating example data data
@hyadiro1233 жыл бұрын
Is it possible to show both bars (counts and percentage) in the same graph?
@StatisticsGlobe3 жыл бұрын
Hey Santiago, yes this would be possible, but you would have to perform some data manipulation first. For instance, you could use a grouped barplot for this: statisticsglobe.com/draw-grouped-barplot-in-r Regards, Joachim
@ghaidabaothman22693 жыл бұрын
Thanks for the video, can you please tell me how to add percentage labels above each bar
@StatisticsGlobe3 жыл бұрын
Hey Ghaida, thank you very much for the comment! You can add labels to a barplot as explained here: statisticsglobe.com/r-position-geom_text-labels-in-grouped-ggplot2-barplot Regards, Joachim
@נועהנבון-ד3ע2 жыл бұрын
@@StatisticsGlobe Thanks for the video, it was very helpful. i still didnt understand how to add percentage labels above each bar. The problem is taht in this example the Y is "(..count..)/sum(..count..)" and in the link y is defined as "height" , the label's code does not work the same way
@nayeemislam81233 жыл бұрын
where did you use the scales package?
@StatisticsGlobe3 жыл бұрын
Hey Nayeem, when I use percent in the last line of code.