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 FLArray
quant(object)
# S4 method for FLArray,character
quant(object) <- value
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 : 4 20 1 1 1 1
#> quant: length
#> units: NA
#>
#> Min : -1.891413
#> 1st Qu.: -0.7409567
#> Mean : 0.08605245
#> Median : 0.02204099
#> 3rd Qu.: 0.9080153
#> Max : 2.25582
#> NAs : 0 %
# 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 : 4 20 1 1 1 1
#> quant: length
#> units: NA
#>
#> Min : -2.460227
#> 1st Qu.: -0.7235499
#> Mean : -0.06884895
#> Median : 0.04868018
#> 3rd Qu.: 0.473452
#> Max : 1.998408
#> NAs : 0 %