Description Usage Arguments Value Examples
Reformat RAS data from wide table format (stations are individual columns) to long table format (stations and data are collapsed to key-value column format.
1 2 | to_longtable(d, data.col, gather.cols, station.col = "Station",
gather.attr = c("River", "Reach"))
|
d |
The data table, i.e. output from |
data.col |
The name of the new column holding data values. |
gather.cols |
The column names to gather data from. If not specified, all columns with the prefix "XS_" will be used. |
station.col |
The name of the new column holding station IDs. |
gather.attr |
The attributes to include in the resulting long-format table. By default the "River" and "Reach" attributes are added as additional columns to the long-format table. |
The original data table in long format.
1 2 3 4 5 6 7 | simple.quasi = system.file("sample-data/SampleQuasiUnsteady.hdf",
package = "RAStestR")
quasi.flow = read_standard(simple.quasi, "Flow")
to_longtable(quasi.flow, "Flow")
quasi.volincum = read_sediment(simple.quasi, "Vol In Cum")
to_longtable(quasi.volincum, "VolumeIn")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.