FLlst-class: Class FLlst

Description Slots Extends Constructor Methods Author(s) See Also Examples

Description

FLlst is a class that extends list but implements a set of features that give a little bit more structure to list objects. First the elements of FLlst must all be of the same class. Second it implements a lock mechanism that, when turned on, does not allow the user to increase or decrease the object length. Both features are needed to propoerly implement FLFleet class.

Slots

.Data

The data. list.

names

Names of the list elements. character.

desc

Description of the object. character.

lock

Lock mechanism, if turned on the length of the list can not be modified by adding or removing elements. logical.

Extends

list

Constructor

The FLlst(object) constructor method allows simple creation of new FLlst with the methods described below.

signature(object=ANY) :

Returns an FLlst object with the provided elements if they are all o the same class.

signature(object=missing) :

Returns an empty FLlst object

signature(object=list) :

Returns and FLlst object with the input list at its core

Methods

[(base) :

Select method.

signature(x=FLlst,i=ANY,j=missing,drop=missing)

[<-(base) :

Replacement method for elements.

signature(x=FLlst,i=ANY,j=missing,value=ANY)

[[<-(base) :

Replacement method within elements.

signature(x=FLlst,i=ANY,j=missing,value=missing)

$<-(base) :

Replacement method for elements.

signature(x=FLlst,name=character,value=missing)

coerce(methods) :

Coerce method.

signature(from=FLlst,to=list,strict=missing)

lapply(base) :

lapply implemented for FLlst objects.

signature(X=missing,FUN=missing)

window(stats) :

Selects a set of years from all elements at once.

signature(x=missing)

Author(s)

The FLR Team

See Also

[, [<-, [[<-, $<-, coerce, lapply, window, list

Examples

1
2
3
4
5
6
7
fll01 <- new("FLlst", list(a=1:10, b=10:20))
fll02 <- new("FLlst", list(1:10, 10:20), names=c("a","b"))
fll03 <- FLlst(a=1:10, b=10:20)
fll04 <- FLlst(list(a=1:10, b=10:20))
fll05 <- FLlst(c(1:10), c(10:20))
names(fll05) <- names(fll01)
names(fll01)

FLCore documentation built on May 2, 2019, 5:46 p.m.