I am using R to calculate some basic statistic results. I am using the quantile() function,to calulate quantiles on a data frame column as follows.

> quantile(foobars[,1])
     0%     25%     50%     75%    100% 
 189000  194975  219500  239950 1000000 

I want to be able to individually access the calculated quantiles. However, I can't seem to find out how to do that. When I check the class of the returned result, it a 1 dimensional numeric.

I tried this:

> q <- quantile(foobars[,1])
> q[3]
   50% 
219500

Which seems to return a tuple (quantile level + number). I am only interested in the number (219500 in this case.

How may I access only the number into a simple (numeric) variable?

r
Edit
Report