dimnames: Modify dimnames of an FLQuant

Description Generic function Methods Author(s) See Also Examples

Description

The dimnames<- method for objects of class FLQuant modifies the dimnames attribute. In contrast with the method for class array, an incomplete named list of dimension names can be provided. Only the relevant dimensions will be modify.

It is posible to modify the name of the first dimension (by default quant) using this method.

Generic function

dimnames<-(x,value)

Methods

signature(x=FLQuant, value=list) :

Modify FLQuant dimnames.

signature(x=FLStock, value=list) :

Modify dimnames of all FLQuant slots inside an FLStock object.

Author(s)

The FLR Team

See Also

dimnames, FLQuant, array

Examples

1
2
3
4
5
flq <- FLQuant(rnorm(80), dim=c(4,10,2))
dimnames(flq) <- list(unit=c('male', 'female'))
# This modifies both dimnames and dimnames name
dimnames(flq) <- list(age=0:3)
dimnames(flq)

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