addbounds | R Documentation |
Adds q - 1
boundaries between the q
ratings to the columns of
matrix x
, and convert the rows to rankings, starting with 0 for the
lowest ranking. Ties are handled by averaging the total rank for all
tied observations.
addbounds(x, q = max(x), ties = "average")
x |
matrix (or data frame) of |
q |
scalar; the number of rating scale categories. Defaults to the
maximum entry in |
ties |
character; handling of ties in |
Any x
which is not a matrix or data frame will cause an error.
A matrix of size n
by m + q - 1
Pieter C. Schoonees
set.seed(1234)
mat <- matrix(sample(1:9, 12, replace = TRUE), nrow = 4, ncol = 3)
addbounds(mat, q = 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.