dimnames<- {FLCore} | R Documentation

## Modify dimnames of an FLQuant

### 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

    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)

[Package FLCore version 2.2 Index]