as.data.frame.nfd | R Documentation |
nfd
objects to other classesas.data.frame
converts nfd
, crss_nf
, and crssi
objects to
data.frame
s.
## S3 method for class 'nfd'
as.data.frame(x, row.names = NULL, optional = FALSE, ..., wide = TRUE)
## S3 method for class 'crssi'
as.data.frame(x, row.names = NULL, optional = FALSE, ..., wide = TRUE)
x |
Object inheriting from |
row.names |
|
optional |
logical. If |
... |
Other parameters passed to |
wide |
When |
data.frame
with columns for date
, trace
, time_step
, and
flow_type
. When wide == TRUE
, there is another column for each site.
When wide == FALSE
, site
, and value
columns. If x
is a crssi
object, than the returned data.frame will also include Sacramento Year Type
Index data as another column (wide == TRUE
) or as another entry into
site
(wide == FALSE
).
nf <- crss_nf(
CoRiverNF::monthlyInt["2000/2002"],
flow_space = "intervening",
time_step = "monthly"
)
# keep sites as columns
as.data.frame(nf)
# moves sites to "site" variable
as.data.frame(nf, wide = FALSE)
# crssi objects have sacramento year type data in them, which is also
# included in the data frame
sac <- sac_year_type_get(internal = TRUE)["2000/2002"]
in_data <- crssi(nf, sac, scen_number = 1.20002002)
as.data.frame(in_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.