Skip to main content

Set Labels

Description

A generic function for setting labels for an object.

Usage

  labels(object) <- value

Arguments

object an object.
value an object.

Examples

library("psychotools")

## method for "paircomp" data
pc <- paircomp(rbind(
  c(1,  1,  1), # a > b, a > c, b > c
  c(1,  1, -1), # a > b, a > c, b < c
  c(1, -1, -1), # a > b, a < c, b < c
  c(1,  1,  1)))
labels(pc)
[1] "a" "b" "c"
labels(pc) <- c("ah", "be", "ce")
pc
[1] {ah > be, ah > ce, be > ce} {ah > be, ah > ce, be < ce}
[3] {ah > be, ah < ce, be < ce} {ah > be, ah > ce, be > ce}