combine_fragments: combine fragments

Description Usage Arguments Value Examples

View source: R/combine_fragments.R

Description

combine multiple fragments of a series as from measuring parts of densitometry samples in WinDENDRO according to given combining rules - this function also averages overlapping measurements.

Usage

1
2
3
4
5
combine_fragments(
  rwl,
  stc = c(3, 4, 1),
  rules = c(a = "[af-l]$", b = "[bm-w]$", c = "[c]$", d = "[dx-z]$")
)

Arguments

rwl

a rwl/data.frame object.

stc

numeric, parameter as defined in read.ids.

rules

combining rules as a vector of named regular expressions - the default combines fragments ending with "f-l" to "a", "m-w" to "b", "c" to "c" and "x-z" to "d".

Value

a data.frame.

Examples

1
2
3
4
5
6
rwl <- data.frame('AbcAA01f' = c(1, 1, NA, NA, NA),
                  'AbcAA01g' = c(NA, NA, 1, 1, NA),
                  'AbcAA01h' = c(NA, NA, NA, NA, 1),
                  'AbcAA01m' = c(2, 2, 2, NA, NA),
                  'AbcAA01n' = c(NA, NA, NA, 2, 2))
combine_fragments(rwl)

konradmayer/trlboku documentation built on July 3, 2020, 9:49 p.m.