Description Usage Arguments Details Value See Also Examples
rdf_to_rwtbl()
converts an rdf list to a tibble.
1 2 3 | rdf_to_rwtbl(rdf, scenario = NULL, keep_cols = FALSE, add_ym = TRUE)
rdf_to_rwtbl2(file, scenario = NA_character_, keep_cols = FALSE, add_ym = TRUE)
|
rdf |
An rdf object (from |
scenario |
An optional parameter, that if it is not |
keep_cols |
Either boolean, or a character vector of column names to
keep in the returned tibble. The values of
|
add_ym |
Boolean that controls whether or not |
file |
The relative or absolute rdf filename. |
The rdf object is converted to a data frame, and then converted to a
tibble::tibble()
. All of the meta
entries in the rdf object
are stored as attributes in the returned tibble. These attributes are:
mrm_config_name
, owner
, description
, create_date
, and n_traces
.
If the rdf contains a scalar slot(s), the scalar slot value(s) will be repeated for every timestep.
A tbl_df with additional attributes from the rdf object.
1 2 3 4 5 6 7 8 9 10 11 12 13 | rdftbl <- rdf_to_rwtbl(keyRdf)
# same as previous, except you do not want "Year" and "Month" columns
rdftbl <- rdf_to_rwtbl(keyRdf, add_ym = FALSE)
# but you do want to keep the object name seperately:
rdftbl <- rdf_to_rwtbl(keyRdf, add_ym = FALSE, keep_cols = "Object")
rdftbl <- rdf_to_rwtbl(sysRdf, scenario = "ISM1988_2014,2007Dems,IG,2002")
# rdf_to_rwtbl2 wants a file path instead of an rdf object
rdfPath <- system.file(
"extdata/Scenario/ISM1988_2014,2007Dems,IG,Most/KeySlots.rdf",
package = "RWDataPlyr"
)
rdftbl <- rdf_to_rwtbl2(rdfPath)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.