Re: [R] Calculates the mean/median from grouped data in R?

2013-05-08 Thread Nuri Jazairi
see if this helps: library(actuar) data(gdental)# grouped data quantile(gdental) mean(gdental) Nuri On Wed, 8 May 2013, jpm miao wrote: Is there a function in R that calculate the mean and median for a grouped data? For example, a survey shows the oil price outlook in the future. How can

Re: [R] Calculates the mean/median from grouped data in R?

2013-05-07 Thread David Winsemius
On May 7, 2013, at 11:15 PM, jpm miao wrote: > Let me revise the data as below. > It is survey data. The respondent must answer the outlook of the oil price, > say, in three months. Respondent A might answer that the price will be in the > 80-90 interval, while B might answer 100-110. I think

Re: [R] Calculates the mean/median from grouped data in R?

2013-05-07 Thread jpm miao
Let me revise the data as below. It is survey data. The respondent must answer the outlook of the oil price, say, in three months. Respondent A might answer that the price will be in the 80-90 interval, while B might answer 100-110. I think there should be a function that finds out the mean and the

Re: [R] Calculates the mean/median from grouped data in R?

2013-05-07 Thread David Winsemius
On May 7, 2013, at 8:40 PM, jpm miao wrote: > Is there a function in R that calculate the mean and median for a grouped > data? > For example, a survey shows the oil price outlook in the future. How can I > calculate the mean/median? > (Of course, I understand that the groups "below 80" and "abov

[R] Calculates the mean/median from grouped data in R?

2013-05-07 Thread jpm miao
Is there a function in R that calculate the mean and median for a grouped data? For example, a survey shows the oil price outlook in the future. How can I calculate the mean/median? (Of course, I understand that the groups "below 80" and "above 110" must be defined more specifically) below 80 4