Learn R Programming

galgo (version 1.4)

Bag: A list-like Object

Description

Create a list of values. Lists inside an Object behave as by value (if the list is modified in a method, the original list is not updated). Therefore, Bag replace this behaviour extending Object and allowing to save reference-lists inside objects.

Usage

Bag(...)

Arguments

...

Values to store in the Bag object.

Class

Package: galgo Class Bag

Object ~~| ~~+--Bag

Directly known subclasses:

public static class Bag extends Object

Fields and Methods

Methods:

length Gets the length of the object as its list version.
print Prints the representation of the Bag object.
summary Prints the representation of the Bag object.

Methods inherited from Object: as.list, unObject, $, $<-, [[, [[<-, as.character, attach, clone, detach, equals, extend, finalize, getFields, getInstanciationTime, getStaticInstance, hasField, hashCode, ll, load, objectSize, print, save

See Also

See also list().

Examples

Run this code
# NOT RUN {
  b <- Bag(a=1,b=2,c=3)
  b
  as.list(b)
  unObject(b)
# }

Run the code above in your browser using DataLab