sweq_as_df: from sweq_simulate to data_frame

Description Usage Arguments Examples

View source: R/dynamics_sweq.R

Description

take a state object from a sweq_simulate list and return a nice data frame

Usage

1
sweq_as_df(state, field_names = c("fluid height", "rain content", "wind"))

Arguments

state

as in sweq_simulate$state.ts

field

names to assign

Examples

1
2
3
4
5
6
sweq.run <- sweq_simulate(1, 60, 168)
ens0 <- sweq_ens0(40, sweq.run)
state_df <- sweq_as_df(sweq.run$state.ts[1,])
ens_df <- sweq_as_df(ens0)
#test:
all.equal(ens0[,1],  filter(ens_df, ensemble=='ens_1')$value)

robertsy/assimilr documentation built on May 27, 2019, 10:33 a.m.