Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

class.container

A Lockable List Structure with Constraints on Content


Description

Container class that specializes the list construct of R to provide content and access control

Creating Objects

new('container', x = [list], content = [character], locked = [logical])

Slots

x

list of entities that are guaranteed to share a certain property

content

tag describing container contents

locked

boolean indicator of locked status. Value of TRUE implies assignments into the container are not permitted

Methods

Class-specific methods:

content(container)

returns content slot of argument

locked(container)

returns locked slot of argument

Standard methods defined for 'container':

show(container)

prints container

length(container)

returns number of elements in the container

[[(index) and [[(index, value)

access and replace elements in the container

[(index)

make a subset of a container (which will itself be a container)

Examples

x1 <- new("container", x=vector("list", length=3), content="lm")
  lm1 <- lm(rnorm(10)~runif(10))
  x1[[1]] <- lm1

Biobase

Biobase: Base functions for Bioconductor

v2.50.0
Artistic-2.0
Authors
R. Gentleman, V. Carey, M. Morgan, S. Falcon
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.