cumulative_sediment: Accumulate Data Over Time and/or Space (Sediment)

Description Usage Arguments Value Examples

Description

Accumulate data from a sediment table over time and/or longitudinally.

Usage

1
2
3
cumulative_sediment(d, time.col = "Time", grain.col = "GrainClass",
  over.time = TRUE, longitudinal = TRUE, direction = c("upstream",
  "downstream"))

Arguments

d

A wide-format table containing values to accumulate.

time.col

The time column name.

grain.col

the grain class column name.

over.time

If TRUE, accumulate data across time steps. This is generally valid only for data output at the computation time step.

longitudinal

If TRUE, accumulate data along the reach. This is generally only valid when all cross sections are included in d.

direction

Accumulate data in the downstream (descending order of cross section IDs) or upstream (ascending order) direction. Ignored if longitudinal is FALSE.

Value

A data frame containing the accumulated data from d. Note that d may be reordered in time and by cross-section and grain class.

Examples

1
2
3
4
5
6
simple.quasi = system.file("sample-data/SampleQuasiUnsteady.hdf",
  package = "RAStestR")
quasi.voloutcum = read_sediment(simple.quasi, "Vol Out Cum")

cumulative_sediment(quasi.voloutcum, over.time = FALSE)
cumulative_sediment(quasi.voloutcum, direction = "downstream")

mkoohafkan/RAStestR documentation built on July 14, 2019, 11:41 p.m.