hjust = 1))
Jeff
From: Bert Gunter
Sent: Sunday, October 14, 2018 10:51 PM
To: reichm...@sbcglobal.net
Cc: R-help
Subject: Re: [R] limit bar graph output
If I understand correctly, just subset your sorted data.
e.g. :
x <- runif(50)
## 50 unsorted values
sort(x, dec = T
A reproducible example would help here (you cannot assume we know what type
"miRNA" is) but guessing from the use of "reorder" I suspect it is a factor. In
which case after you subset you will need to use the droplevels function to
remove the unused levels, and then plot that prepared data.
On
If I understand correctly, just subset your sorted data.
e.g. :
x <- runif(50)
## 50 unsorted values
sort(x, dec = TRUE)[1:10]
## the 10 biggest
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley B
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))
4 matches
Mail list logo