No video

Improving the appearance of a stacked barchart with ggplot2, dplyr, and forcats (CC103)

  Рет қаралды 12,219

Riffomonas Project

Riffomonas Project

Күн бұрын

Пікірлер: 33
@Riffomonas
@Riffomonas 3 жыл бұрын
Without using a different chart type, what else would you do to improve the appearance of these stacked bar charts?
@erickcardenas6055
@erickcardenas6055 3 жыл бұрын
You can facet by taxa with scales=free_y.
@trevorjgould
@trevorjgould 3 жыл бұрын
@@erickcardenas6055 then sort facets so highest mean y is first.
@david6661997
@david6661997 2 жыл бұрын
Interesting, I'm back to R and study how write code, this video is useful for start to make charts with weather information, thanks for your video was very helpful.
@Riffomonas
@Riffomonas 2 жыл бұрын
My pleasure. Thanks for watching!
@julianrozenberg2036
@julianrozenberg2036 2 жыл бұрын
Well, the.beauty of you presentations is that you not only learn R.... Actually, what I learn is English😃😃😃
@Riffomonas
@Riffomonas 2 жыл бұрын
Ha! That’s wonderful to hear. Thanks for watching 🤓
@johnschloss694
@johnschloss694 3 жыл бұрын
Nice vid!
@Riffomonas
@Riffomonas 3 жыл бұрын
You’re awesome!
@mikodine
@mikodine Жыл бұрын
Love stacked bar charts! What alternative do you prefer?
@sven9r
@sven9r 3 жыл бұрын
amazing videos! glad I found your stuff! greetings from germany :)
@Riffomonas
@Riffomonas 3 жыл бұрын
My pleasure - thanks for watching!
@liliabkar
@liliabkar Жыл бұрын
Thanks for sharing these.very helpful!!
@johnschloss694
@johnschloss694 3 жыл бұрын
nice vid
@Riffomonas
@Riffomonas 3 жыл бұрын
Thanks dude
@yaqinguo8971
@yaqinguo8971 3 жыл бұрын
great video. Thanks
@Riffomonas
@Riffomonas 3 жыл бұрын
You are welcome!
@cristianjaviermena6955
@cristianjaviermena6955 Жыл бұрын
THE MANNNNNNN thanks a lot
@ndipagbor7280
@ndipagbor7280 2 жыл бұрын
Thank you so much for your lectures. They really help me understand the basics of R. I have a questions concerning barcharts in ggplot2. Is there a way to place the bars and tick labels between the tick marks rather than on them? This is possible in excel. It will be nice to replicate that in R
@Riffomonas
@Riffomonas 2 жыл бұрын
I know it’s possible. Probably would involve using the theme function on the major and minor axis ticks
@ndipagbor7280
@ndipagbor7280 2 жыл бұрын
@@Riffomonas Thank you so much. I'll try that again and see what I get.
@minhtrungdang1853
@minhtrungdang1853 2 жыл бұрын
Thank you for the video. What will we do if we want to sort bar in order. For example, we want to put Fermicute at the bottom and the mean will increase in the order : Healthy, Diarrhea C difficile positive, and Diarrhea C difficile negative ?
@Riffomonas
@Riffomonas 2 жыл бұрын
Keep watching the later episodes in that series where I cover that. Still, I strongly encourage using side by side bars/boxes over stacked bars
@minhtrungdang1853
@minhtrungdang1853 2 жыл бұрын
@@Riffomonas Thank you ! what post you discuss on this issue? I used stacked bar chart and side by side when I need two
@Riffomonas
@Riffomonas 2 жыл бұрын
@@minhtrungdang1853 kzbin.info/www/bejne/rWW7ZKJsgradjKM
@thorbjornf.8873
@thorbjornf.8873 Жыл бұрын
Thanks a lot! Is there a way (not manually) to reorder the stacked bar plots in a specific/ascending order of the most abundant taxa (Firmicutes)? Leaving Healthy on the left, changing the position of Diarrhea pos. to middel and Diarrhea neg. to the right?
@Riffomonas
@Riffomonas Жыл бұрын
Thanks for watching! Just to be clear - I hate stacked bar charts 😂 You could make the disease status a factor and order the factor by whatever you want
@user-oj6lo7xx7m
@user-oj6lo7xx7m Жыл бұрын
Would it be better to separate the phyla into their own graphs and look at them separately? Like different facets or grids? One for each Phyla?
@Riffomonas
@Riffomonas 5 ай бұрын
Hopefully you found my other videos, but my preference woudl be to put the taxa on the x-axis and cluster the treatment groups within each taxa. Then represent the individual samples with a jitter plot
@muhammadrahmanalishah6188
@muhammadrahmanalishah6188 2 жыл бұрын
how we calculate percentage of each sample.. can you tell me..?
@Riffomonas
@Riffomonas 2 жыл бұрын
I forget what I did here but you should be able to group by the sample and then look at the count divided by the sum of the counts for each group to get the relative abundance. Multiply by 100 to get the percentage
@muhammadrahmanalishah6188
@muhammadrahmanalishah6188 2 жыл бұрын
@@Riffomonas Thank you so much
@christophschweingruber936
@christophschweingruber936 Жыл бұрын
Great videos! You can simplify the pooling of taxa with forcats::fct_lump functions into one step, which I find really handy.
Creating a stacked barchart in R with ggplot2 (CC102)
22:19
Riffomonas Project
Рет қаралды 32 М.
Recreating a jitter plot made with R's ggplot2 two years later (CC243)
29:59
Riffomonas Project
Рет қаралды 1,7 М.
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 18 МЛН
👨‍🔧📐
00:43
Kan Andrey
Рет қаралды 11 МЛН
How to clean and join data from mothur with the dplyr R package (CC101)
25:48
Barplot and column plot using R (ggplot)
13:03
BioinfQuests
Рет қаралды 27 М.
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН