FLQuant {FLCore}R Documentation

Create FLQuant objects

Description

The FLQuant constructor method allows simple creation of new FLQuant objects from vectors, matrices and arrays.

R standard recyling rules (row first) are applied in most cases, so if an input object smaller than the required dimensions is given, it will be reused. An exception is made for objects of class vector, which will be considered to go along the second dimension (year) instead of the first one. To recover the standard behaviour, a matrix can be created.

The iter argument takes preference over dim but not over dimnames, so it is preferable to ensure consistency between arguments. dim and dimnames must match and an error is thrown otherwise.

Arguments

object
An input object.
dim
The dimensions of the object. A vector of class numeric.
dimnames
The dimension names, as a list.
quant
A character string with the name of the first dimension. Defaulta to 'quant'
units
A character string with the units of measurement. Defaults to 'NA'
iter
The number of iterations, i.e. the length of the sixth dimension, on the output object.
fill.iter
TRUE

Generic function

FLQuant(object)

Methods

signature(object=missing) :
Describe method
signature(object=vector) :
Describe method
signature(object=array) :
Describe method
signature(object=matrix) :
Describe method
signature(object=FLQuant) :
Describe method

Author(s)

The FLR Team

See Also

FLQuant-class

Examples

flq <- FLQuant()
flq <- FLQuant(1:10, dim=c(2,5))
summary(flq)

# Vectors are used column first...
dim(FLQuant(1:10))
# ...while matrices go row first.
dim(FLQuant(matrix(1:10)))

FLQuant(matrix(rnorm(100), ncol=20))

FLQuant(array(rnorm(100), dim=c(5,2,1,1,1,10)))
FLQuant(array(rnorm(100), dim=c(5,2)), iter=10)

[Package FLCore version 2.2 Index]