I have a dataframes with a column called Means. I want to get just the first quartile from this column. I know I can use quartile (df) or summary (df) but this gives me all the quartiles. How do I get just the first?
You could try this:
#sample data
Means <- runif(100)
#and this is how you get the first quartile
> summary(Means)[2]
1st Qu.
0.2325
Or using function quantile
as per Pascal's comment:
> quantile(Means, 0.25)
25%
0.2324663
-
Note that you can always use a character reference as well:
summary(Means)[["1st Qu."]]
. – Kim Feb 19 at 4:08
quantile
and itsprobs
argument. – user3710546 Sep 1 '15 at 10:31