Learn R Programming

dcGOR (version 1.0.6)

InfoDataFrame-class: Definition for S4 class InfoDataFrame

Description

InfoDataFrame has two slots: data and dimLabels.

Arguments

Value

Class InfoDataFrame

Slots

data
A data.frame containing terms (rows) and measured variables (columns).
dimLabels
A character descripting labels for rows and columns.

Creation

An object of this class can be created via: new("InfoDataFrame", data, dimLabels)

Methods

Class-specific methods:
  • dim(): retrieve the dimension in the object
  • nrow(): retrieve number of rows in the object
  • ncol(): retrieve number of columns in the object
  • rowNames(): retrieve names of rows in the object
  • colNames(): retrieve names of columns in the object
  • dimLabels(): retrieve the slot 'dimLabels', containing labels used for display of rows and columns in the object
  • Data(): retrieve the slot 'data' in the object
Standard generic methods:
  • str(): compact display of the content in the object
  • show(): abbreviated display of the object
  • as(data.frame, "InfoDataFrame"): convert a data.frame to an object of class InfoDataFrame
  • [i,j]: get the subset of the same class

Access

Ways to access information on this class:
  • showClass("InfoDataFrame"): show the class definition
  • showMethods(classes="InfoDataFrame"): show the method definition upon this class
  • getSlots("InfoDataFrame"): get the name and class of each slot in this class
  • slotNames("InfoDataFrame"): get the name of each slot in this class
  • selectMethod(f, signature="InfoDataFrame"): retrieve the definition code for the method 'f' defined in this class

See Also

InfoDataFrame-method

Examples

Run this code
# generate data on domain information on
data <- data.frame(x=1:10, y=I(LETTERS[1:10]),
row.names=paste("Domain", 1:10, sep="_"))
dimLabels <- c("rowLabels", "colLabels")
# create an object of class InfoDataFrame
x <- new("InfoDataFrame", data=data, dimLabels=dimLabels)
x
# alternatively, using coerce methods
x <- as(data, "InfoDataFrame")
x
# look at various methods defined on class Anno
dimLabels(x)
dim(x)
nrow(x)
ncol(x)
rowNames(x)
colNames(x)
Data(x)
x[1:3,]

Run the code above in your browser using DataLab