Skip to contents

Function to get or set the name of the first dimension (quant) in an object of any FLArray-based class, like FLQuant or FLCohort.

Usage

quant(object, ...)

# S4 method for class 'FLArray'
quant(object)

# S4 method for class 'FLArray,character'
quant(object) <- value

Generic function

quant(object) quant<-(object,value)

See also

Author

The FLR Team

Examples


# quant is 'quant' by default
  quant(FLQuant())
#> [1] "quant"

flq <- FLQuant(rnorm(80), dim=c(4,20), quant='age')
quant(flq)
#> [1] "age"
quant(flq) <- 'length'
summary(flq)
#> An object of class "FLQuant" with:
#> 
#> dim:    length year unit season area iter 
#>         4      20   1    1      1    1 
#> units:  NA 
#> 
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    %NAs 
#>  -1.891  -0.741   0.022   0.086   0.908   2.256   0.000 


# quant is 'quant' by default
  quant(FLQuant())
#> [1] "quant"

flq <- FLQuant(rnorm(80), dim=c(4,20), quant='age')
quant(flq)
#> [1] "age"
quant(flq) <- 'length'
summary(flq)
#> An object of class "FLQuant" with:
#> 
#> dim:    length year unit season area iter 
#>         4      20   1    1      1    1 
#> units:  NA 
#> 
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    %NAs 
#>  -2.460  -0.724   0.049  -0.069   0.473   1.998   0.000