rating.prob | R Documentation |
Computes observed rating frequencies per level of a factor, in various formats.
rating.prob(x, g, type = c("prob", "cumprob", "class"))
x |
ordered factor (ratings). |
g |
factor giving groups to be compared. |
type |
type of output to be returned: |
Maxime HERVE <maxime.herve@univ-rennes1.fr>
require(ordinal)
data(wine)
# Frequencies
rating.prob(wine$rating,wine$contact:wine$temp)
# Cumulative frequencies
rating.prob(wine$rating,wine$contact:wine$temp,type="cumprob")
# Most frequent rating
rating.prob(wine$rating,wine$contact:wine$temp,type="class")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.