Description Generic function Methods Author(s) See Also Examples
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.
as.data.frame(x, row.names, optional)
Converts an FLQuant into a data.frame
Converts objects of any class inheriting from FLComp into a data.frame
Converts objects of class FLCatch into a data.frame
Converts objects of class FLQuants into a data.frame
Converts objects of class FLCohorts into a data.frame
Converts objects of class FLPar into a data.frame
Converts objects of class FLCohort into a data.frame
The FLR Team
as.data.frame, model.frame, model.frame,FLlst-method
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.