Description Usage Arguments Value Examples
Reformat RAS data from long table format (i.e. output of
to_longtable
) to wide table format (key values are mapped to
individual columns).
1 2 | to_widetable(d, key.col, value.col, key.prefix, key.attr = c("River",
"Reach"))
|
d |
The data table, i.e. output from |
key.col |
The name of the column holding data keys. |
value.col |
The name of the column holding data values. |
key.prefix |
Text to prepend to the new columns created from
keys in |
key.attr |
Columns to maintain as attributes in the resulting wide-format table. By default, columns "River" and "Reach" will be searched for and maintained as attributes in the output wide-format |
The original data table in wide format.
1 2 3 4 5 6 | simple.quasi = system.file("sample-data/SampleQuasiUnsteady.hdf",
package = "RAStestR")
quasi.volincum = read_sediment(simple.quasi, "Vol In Cum")
quasi.long = to_longtable(quasi.volincum, "VolIn")
to_widetable(quasi.long, "Station", "VolIn")
to_widetable(quasi.long, "GrainClass", "VolIn")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.