Rgb (version 1.5.1)

refTable-constructor:

Description

This function returns a new object from various arguments. Notice the new() alternative can be used to produce an empty object, setting only the fields not the content.

Usage

refTable(..., row.names, warn = TRUE)

Arguments

A data.frame, a list or a set of named vectors to use as columns. For list and vectors, row.names will be used as row names if provided.
row.names
Character vector, the names of the rows for list or vector input.
warn
Single logical value, to be passed to the check method.

Value

An object of class .

See Also

refTable-class

Examples

Run this code
  # From vectors
  tab <- refTable(colA=1:5, colB=letters[1:5])
  print(tab$extract(3,))
  
  # From list (recycling)
  columns <- list(number=1, letters=LETTERS)
  tab <- refTable(columns)
  print(tab$extract())
  
  # data.frame conversion
  dataFrame <- data.frame(colA=1:5, colB=letters[1:5])
  tab <- refTable(dataFrame)
  print(tab$extract())

Run the code above in your browser using DataLab