operate_table: Table Operations

Description Usage Arguments Value Examples

Description

Combine tables via an operation, e.g. addition or multiplication.

Usage

1
operate_table(..., fun, partial = FALSE, time.col = "Time")

Arguments

...

Arbitrary number of wide-format data tables to combine.

fun

A function to apply. If multiple tables are supplied in ..., fun must either be one of the strings "+", "-", "*" and "/" or be a function that accepts exactly two arguments. If only one table is supplied in ..., fun must accept exactly one argument.

partial

If TRUE, only the overlapping times and columns will be processed.

time.col

The time column name.

Value

A single table.

Examples

1
2
3
4
5
6
7
8
simple.quasi = system.file("sample-data/SampleQuasiUnsteady.hdf",
  package = "RAStestR")
quasi.flow = read_standard(simple.quasi, "Flow")

operate_table(quasi.flow, quasi.flow, fun = "+")
operate_table(quasi.flow, quasi.flow, fun = "-")
operate_table(quasi.flow, fun = function(x) 0.5*x)
operate_table(quasi.flow, fun = function(x) x/x)

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