as.data.frame: Method as.data.frame

Description Generic function Methods Author(s) See Also Examples

Description

This method converts an FLQuant or any other FLR object composed of FLQuants into a data.frame.

For a single FLQuant, the data.frame returned has 7 columns: quant, year, unit, season, area, iter and data. The last column contains the actual values stored in the original object, while the first six contain the corresponding dimensions. The year and data columns are of class numeric, while the other five are of class factor.

When converting an FLCohort object, the year column is substituted by cohort.

The data.frame returned for complex objects, i.e. those the inherit from class FLComp, has an extra column, slot, that holds the name of the slot in the original object.

The data.frame obtained from an FLQuants object also has an extra column, named qname, that refers to the name of each FLQuant object in the list. This column is named cname when an FLCohorts object is converted.

Objects of class FLQuants can also be converted into a wide-format table, where data from the list elements are placed in separate colums, using model.frame,FLlst-method.

Generic function

as.data.frame(x, row.names, optional)

Methods

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

Converts an FLQuant into a data.frame

signature(x=FLComp,row.names=missing,optional=missing) :

Converts objects of any class inheriting from FLComp into a data.frame

signature(x=FLCatch,row.names=missing,optional=missing) :

Converts objects of class FLCatch into a data.frame

signature(x=FLQuants,row.names=missing,optional=missing) :

Converts objects of class FLQuants into a data.frame

signature(x=FLCohorts,row.names=missing,optional=missing) :

Converts objects of class FLCohorts into a data.frame

signature(x=FLPar,row.names=ANY,optional=ANY) :

Converts objects of class FLPar into a data.frame

signature(x=FLCohort,row.names=ANY,optional=ANY) :

Converts objects of class FLCohort into a data.frame

Author(s)

The FLR Team

See Also

as.data.frame, model.frame, model.frame,FLlst-method

Examples

1
2
3
4
5
6
7
data(ple4)
fdf <- as.data.frame(catch.n(ple4))
head(fdf)
summary(fdf)

sdf <- as.data.frame(ple4)
head(sdf)

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