mscale

0th

Percentile

Extract/Replace Measurement Scale

Generic functions for extracting and replacing the measurement scale from an object.

Keywords
classes
Usage
mscale(object, …)
  mscale(object) <- value
Arguments
object

an object.

arguments passed to methods.

value

an object describing the measurement scale.

Aliases
  • mscale
  • mscale<-
Examples
# NOT RUN {
## methods for "paircomp" data
pc <- paircomp(rbind(
  c(2,  1,  0),
  c(1,  1, -1),
  c(1, -2, -1),
  c(0,  0,  0)))
pc

## extract
mscale(pc)

## replace (collapse to >/=/< scale)
mscale(pc) <- sign(mscale(pc))
pc


## similar for "itemresp" data
ir <- itemresp(cbind(
  c(-1, 0, 1, 1, 0),
  c(0, 1, 2, 1, 2),
  c(1, 2, 1, 1, 3)))
ir

## extract
mscale(ir)

## replace (single scale for all items)
mscale(ir) <- 1:3
ir
# }
Documentation reproduced from package psychotools, version 0.5-1, License: GPL-2 | GPL-3

Community examples

Looks like there are no examples yet.