[R] limit bar graph output

Jeff Reichman reichm@nj @ending from @bcglob@l@net
Mon Oct 15 04:13:01 CEST 2018


R-Help Forum

I'm using the following code to reorder (from highest to lowest) my miRNA
counts.  But there are 500 plus and I only need the first (say) 15-20.  How
do I limit ggplot to only the first 20 miRNA counts

ggplot(data = corr.m, aes(x = reorder(miRNA, -value), y = value, fill =
variable)) + 
  geom_bar(stat = "identity")

Jeff



More information about the R-help mailing list