covariates: Extract/Set Covariates

View source: R/paircomp.R

covariatesR Documentation

Extract/Set Covariates

Description

A generic function for extracting/setting covariates for an object.

Usage

  covariates(object, ...)
  covariates(object) <- value

Arguments

object

an object.

...

arguments passed to methods.

value

an object.

Examples

## 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)))
covariates(pc)
covariates(pc) <- data.frame(foo = factor(c(1, 2, 2), labels = c("foo", "bar")))
covariates(pc)

psychotools documentation built on May 29, 2024, 8:12 a.m.