FLQuant-class: FLQuant class for numerical data

Description Slots Extends Constructor Constructor Arguments Methods Author(s) See Also Examples

Description

The FLQuant class is a six-dimensional array designed to store most quantitative data used in fisheries and population modelling.

The sixth dimensions are named. The name of the first dimension can be altered by the user from its default, quant. This could typically be age or length for data related to natural populations. The only name not accepted is 'cohort', as data structured along cohort should be stored using the FLCohort class instead. Other dimensions are always names as follows: year, for the calendar year of the datapoint; unit, for any kind of division of the population, e.g. by sex; season, for any temporal strata shorter than year; area, for any kind of spatial stratification; and iter, for replicates obtained through bootstrap, simulation or Bayesian analysis.

In addition, FLQuant objects contain a units attribute, of class character, intended to contain the units of measurement relevant to the data.

Slots

.Data

A 6-D array for numeric data. array.

units

Units of measurement. character.

Extends

FLArray array

Constructor

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.

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

Constructor 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

Methods

[(base) :

Extract elements

signature(x=FLQuant,i=ANY,j=ANY,drop=missing)

[<-(base) :

Substitute elements

signature(x=FLQuant,i=ANY,j=ANY,value=missing)

apply(base) :

Operate with a function along certain dimensions

signature(X=FLQuant,MARGIN=numeric,FUN=function)

Arith(methods) :

Arithmetic operations

signature(e1=FLQuant,e2=FLQuant)

as.data.frame(base) :

Convert to a data.frame with 7 columns

signature(x=FLQuant,row.names=ANY,optional=ANY)

as.FLQuant(FLCore) :

Convert into an FLQuant

signature(x=missing)

barchart(lattice) :

Plot a barchart following the given formula

signature(x=formula,data=FLQuant)

bubbles(FLCore) :

Plot a bubble following the given formula, with size of the bubbles given by the values in the object

signature(x=formula,data=FLQuant)

bwplot(lattice) :

Describe method

signature(x=formula,data=FLQuant)

catch<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

catch<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

catch.n<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

catch.n<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

catch.n<-(FLCore) :

Describe method

signature(object=FLIndex,value=FLQuant)

catch.wt<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

catch.wt<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

catch.wt<-(FLCore) :

Describe method

signature(object=FLIndex,value=FLQuant)

coerce(methods) :

Describe method

signature(from=NULL,to=FLQuant,strict=missing)

cv(FLCore) :

Describe method

signature(object=missing)

dimnames<-(base) :

Describe method

signature(x=missing,value=missing)

dims(FLCore) :

Describe method

signature(obj=missing)

discards<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

discards<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

discards.n<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

discards.n<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

discards.wt<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

discards.wt<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

dotplot(lattice) :

Describe method

signature(x=formula,data=FLQuant)

E(FLCore) :

Describe method

signature(object=missing)

fec<-(FLCore) :

Describe method

signature(object=FLBiol,value=FLQuant)

FLCatch(FLCore) :

Describe method

signature(object=missing)

FLCohort(FLCore) :

Describe method

signature(object=missing)

FLMetier(FLCore) :

Describe method

signature(catches=missing)

FLQuant(FLCore) :

Describe method

signature(object=missing)

FLQuantPoint(FLCore) :

Describe method

signature(object=missing)

FLSR(FLCore) :

Describe method

signature(object=FLQuant,model=missing)

FLSR(FLCore) :

Describe method

signature(object=FLQuant,model=character)

FLSR(FLCore) :

Describe method

signature(object=FLQuant,model=function)

FLSR(FLCore) :

Describe method

signature(object=FLQuant,model=formula)

harvest<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

histogram(lattice) :

Describe method

signature(x=formula,data=FLQuant)

iter(FLCore) :

Describe method

signature(object=missing)

iter<-(FLCore) :

Describe method

signature(object=missing,value=missing)

iters(FLCore) :

Describe method

signature(object=missing)

landings<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

landings<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

landings.n<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

landings.n<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

landings.wt<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

landings.wt<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

m<-(FLCore) :

Describe method

signature(object=FLStock,value=FLQuant)

m<-(FLCore) :

Describe method

signature(object=FLBiol,value=FLQuant)

n<-(FLCore) :

Describe method

signature(object=FLBiol,value=FLQuant)

names(base) :

Describe method

signature(x=missing)

plot(graphics) :

Describe method

signature(x=FLQuant,y=missing)

price<-(FLCore) :

Describe method

signature(object=FLCatch,value=FLQuant)

print(base) :

Describe method

signature(x=missing)

propagate(FLCore) :

Describe method

signature(object=missing)

quant(FLCore) :

Describe method

signature(object=missing)

quant<-(FLCore) :

Describe method

signature(object=missing,value=missing)

quantile(stats) :

Describe method

signature(x=missing)

rlnorm(stats) :

Describe method

signature(n=numeric,meanlog=FLQuant,sdlog=FLQuant)

rlnorm(stats) :

Describe method

signature(n=numeric,meanlog=FLQuant,sdlog=numeric)

rlnorm(stats) :

Describe method

signature(n=numeric,meanlog=numeric,sdlog=FLQuant)

rnorm(stats) :

Describe method

signature(n=numeric,mean=FLQuant,sd=FLQuant)

show(methods) :

Describe method

signature(object=missing)

spwn<-(FLCore) :

Describe method

signature(object=FLBiol,value=FLQuant)

stripplot(lattice) :

Describe method

signature(x=formula,data=FLQuant)

summary(base) :

Describe method

signature(object=missing)

trim(FLCore) :

Describe method

signature(object=missing)

units(base) :

Describe method

signature(x=missing)

units<-(base) :

Describe method

signature(x=FLQuant,value=character)

window(stats) :

Describe method

signature(x=missing)

wt<-(FLCore) :

Describe method

signature(object=FLBiol,value=FLQuant)

xyplot(lattice) :

Describe method

signature(x=formula,data=FLQuant)

Author(s)

The FLR Team

See Also

[, [<-, apply, Arith, as.data.frame, as.FLQuant, barchart, bubbles, bwplot, catch<-, catch.n<-, catch.wt<-, coerce, cv, dimnames<-, dims, discards<-, discards.n<-, discards.wt<-, dotplot, E, fec<-, FLCatch, FLCohort, FLMetier, FLQuant, FLQuantPoint, FLSR, harvest<-, histogram, iter, iter<-, iters, landings<-, landings.n<-, landings.wt<-, m<-, n<-, names, plot, price<-, print, propagate, quant, quant<-, quantile, rlnorm, rnorm, show, spwn<-, stripplot, summary, trim, units, units<-, window, wt<-, xyplot, array

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# creating a new FLQuant
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)

# working with FLQuant objects
flq <- FLQuant(rnorm(200), dimnames=list(age=1:5, year=2000:2008), units='diff')
summary(flq)

flq[1,]
flq[,1]
flq[1,1] <- 0

units(flq)
quant(flq)

xyplot(data ~ year, data=flq, type='b', main='FLQ Test Plot', groups=age,
  ylab='diff', xlab='', pch=19, auto.key=TRUE)

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