spm_as_dataset | R Documentation |
sspm_dataset
dataset structureThis casts a data.frame
or sf
object into an object of class
sspm_dataset
. This object is the format the package
uses to manage and manipulate the modeling data.
spm_as_dataset(data, name, time, uniqueID, coords = NULL, ...)
## S4 method for signature 'data.frame,ANY,ANY,ANY,missingOrNULL'
spm_as_dataset(
data,
name,
time,
uniqueID,
coords,
crs = NULL,
boundaries = NULL,
biomass = NULL,
density = NULL,
biomass_units = NULL,
density_units = NULL
)
## S4 method for signature 'data.frame,ANY,ANY,ANY,list'
spm_as_dataset(
data,
name,
time,
uniqueID,
coords,
crs = NULL,
boundaries = NULL,
biomass = NULL,
density = NULL,
biomass_units = "kg",
density_units = "kg/km^2"
)
## S4 method for signature 'data.frame,ANY,ANY,ANY,character'
spm_as_dataset(
data,
name,
time,
uniqueID,
coords,
crs = NULL,
boundaries = NULL,
biomass = NULL,
density = NULL,
biomass_units = "kg",
density_units = "kg/km^2"
)
## S4 method for signature 'sf,ANY,ANY,ANY,ANY'
spm_as_dataset(
data,
name,
time,
uniqueID,
coords,
crs = NULL,
boundaries = NULL,
biomass = NULL,
density = NULL,
biomass_units = "kg",
density_units = "kg/km^2"
)
data |
[data.frame OR sf] The dataset. |
name |
[character] The name of the dataset, default to "Biomass". |
time |
[character] The column of |
uniqueID |
[character] The column of |
coords |
[character] The column of |
... |
Arguments passed onto methods. |
crs |
Coordinate reference system, passed onto st_as_sf. |
boundaries |
[sspm_boundary] An object of class sspm_discrete_boundary. |
biomass |
[character] Columns to be encoded as biomasses (required). |
density |
[character] Columns to be encoded as densities (optionnal). |
biomass_units |
[character] Units for biomass columns, default to "kg". |
density_units |
[character] Units for density columns, default to "kg/km^2". |
An object of class sspm_dataset
.
data(borealis_simulated, package = "sspm")
biomass_dataset <- spm_as_dataset(data.frame(borealis_simulated), name = "borealis",
density = "weight_per_km2",
time = "year_f",
coords = c('lon_dec','lat_dec'),
uniqueID = "uniqueID")
biomass_dataset
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.