You could use the weighted mean (?weighted.mean) or weighted median (?wtd.quantile in package Hmisc).
On 9/19/06, Taka Matzmoto <[EMAIL PROTECTED]> wrote: > Hi R-users > I have a data set. There are 10 products and the numbers of people who > ranked the products. > > The format of the data set is > > productID rank1 rank2 rank3 rank4 rank5 rank6 rank7 rank8 rank9 rank10 > ------------------------------------------------------------------------------------------------------- > 1 10 > 2 3 > 3 6 > 4 2 > 5 24 > 6 8 > 7 3 > 8 8 > 9 4 > 10 5 > > Each cell has the number of people who ranked the product. For example, 4 > people who ranked 9th product best. > > I would like to know how to summarze this data using some R functions. My > goal is to figure out what is the best product based on the ranking > information. > > Easy one is to look at only rank1 column, then I do not utilize all > information the data have. > I can also do this. For each product, the number of people * rank scores and > then pick lowest number for the best product. > > Is there any other way I can summarize this data? > > Any suggestion for R fundtions or statistical methos will be appreciated. > > Taka, > > _________________________________________________________________ > Get today's hot entertainment gossip http://movies.msn.com/movies/hotgossip > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
