| as.data.frame | R Documentation |
The as.data.frame() methods for mizer array classes turn matrix- and
array-like results into tidy long-form data frames, with one row per
observed combination of species, size and/or time. The numeric result is
always stored in a column called value.
## S3 method for class 'ArraySpeciesBySize'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
## S3 method for class 'ArrayTimeBySpecies'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
## S3 method for class 'ArrayTimeBySpeciesBySize'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
x |
An |
row.names |
Optional and included only for compatibility with the base
generic. |
optional |
Optional and included only for compatibility with the base
generic. A logical value. If |
... |
Further arguments. They are currently ignored by the mizer methods. |
The returned columns are:
ArraySpeciesBySize: w, value, Species.
ArrayTimeBySpecies: time, value, Species.
ArrayTimeBySpeciesBySize: time, Species, w, value.
If the original object has non-numeric or missing dimension names, sequential
indices are used for the time or w columns. Species names are taken from
the row, column or dimension names of the original object.
A data frame in long format.
print(), summary(), str(), plot(), ArraySpeciesBySize(),
ArrayTimeBySpecies(), ArrayTimeBySpeciesBySize()
enc <- getEncounter(NS_params)
head(as.data.frame(enc))
biomass <- getBiomass(NS_sim)
head(as.data.frame(biomass))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.