| as.data.frame {FLCore} | R Documentation |
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-class 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-class 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-class 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)
The FLR Team
as.data.frame, model.frame, model.frame,FLlst-method
data(ple4) fdf <- as.data.frame(catch.n(ple4)) head(fdf) summary(fdf) sdf <- as.data.frame(ple4) head(sdf)