Last data update: 2014.03.03

R: Rating matrix (RM) slot
RMR Documentation

Rating matrix (RM) slot

Description

RM (Rating matrix) is a slot of ratingObj class. It consists of a matrix of alternatives with their scale category and idealised prioritise.

Author(s)

Daryanaz Dargahi <daryanazdargahi@gmail.com>

Examples

mat <- matrix(nrow = 4, ncol = 4, data = NA)

# Category PCM matrix
rownames(mat) <- c('excellent','good','fair','poor')
colnames(mat) <- c('excellent','good','fair','poor')
mat[1,] <- c(1,2,4,6)
mat[2,] <- c(NA,1,2,4)
mat[3,] <- c(NA,NA,1,2)
mat[4,] <- c(NA,NA,NA,1)

# Alternative matrix
alt <- matrix(nrow = 5, ncol = 2, data = NA)
alt[,1] <- c("Andy", "Emily", "Nina", "Alex", "Jack")
alt[,2] <- c("good", "poor", "good", "fair", "excellent")

result <- rating(mat, alt, simulation = 500)
RM(result)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Prize)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Prize/RM.Rd_%03d_medium.png", width=480, height=480)
> ### Name: RM
> ### Title: Rating matrix (RM) slot
> ### Aliases: RM Rm rm RM,ANY-method
> 
> ### ** Examples
> 
> mat <- matrix(nrow = 4, ncol = 4, data = NA)
> 
> # Category PCM matrix
> rownames(mat) <- c('excellent','good','fair','poor')
> colnames(mat) <- c('excellent','good','fair','poor')
> mat[1,] <- c(1,2,4,6)
> mat[2,] <- c(NA,1,2,4)
> mat[3,] <- c(NA,NA,1,2)
> mat[4,] <- c(NA,NA,NA,1)
> 
> # Alternative matrix
> alt <- matrix(nrow = 5, ncol = 2, data = NA)
> alt[,1] <- c("Andy", "Emily", "Nina", "Alex", "Jack")
> alt[,2] <- c("good", "poor", "good", "fair", "excellent")
> 
> result <- rating(mat, alt, simulation = 500)
> RM(result)
      scale_category idealised_priorities
Andy  "good"         "0.537284965911771" 
Emily "poor"         "0.144337567297406" 
Nina  "good"         "0.537284965911771" 
Alex  "fair"         "0.268642482955885" 
Jack  "excellent"    "1"                 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>