difference_sediment: Difference Table (Sediment)

Description Usage Arguments Value Examples

View source: R/main.r

Description

Compute a difference table from sediment data.

Usage

1
2
3
difference_sediment(d1, d2, relative = FALSE, partial = FALSE,
  difference.col = "Difference", time.col = "Time",
  grain.col = "GrainClass")

Arguments

d1

The first dataframe, considered the "base" result.

d2

The second dataframe, considered the "new" result.

relative

Logical: report differences as relative difference.

partial

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

difference.col

The name of the difference column to be created.

time.col

The time column name.

grain.col

the grain class column name.

Value

A dataframe in long table format, with difference defined as d2- d1. If relative = TRUE, the difference is defined as (d2 - d1)/(0.5*(d2 + d1))

Examples

1
2
3
4
5
6
7
8
9
simple.quasi = system.file("sample-data/SampleQuasiUnsteady.hdf",
  package = "RAStestR")
quasi.volincum = read_sediment(simple.quasi, "Vol In Cum")

difference_sediment(quasi.volincum, quasi.volincum)

quasi.double = operate_sediment(quasi.volincum , fun = function(x) 2*x)
difference_sediment(quasi.volincum, quasi.double)
difference_sediment(quasi.volincum, quasi.double, relative = TRUE)

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