gg_cellphase_data: Create's a ggplot friendly data table for the dm.phase...

Description Usage Arguments Value Author(s) Examples

View source: R/gg_cellphase_data.R

Description

Transform the phase data into a single ggplot2 friendly data frame.

Usage

1
gg_cellphase_data(dm.gpf, resolution = dendro.resolution(dm.gpf),shapeSensitivity = 0.6, minmaxDist = 0.2,minmaxSD = 2, radialIncrease = "max", na.omit = TRUE)

Arguments

dm.gpf

a data.frame with either gap-free or gap-filled dendrometer series as produced by fill_gaps.

resolution

a numeric specifying the resolution of the dendrometer data in seconds. Defaults to the resolution of dm.gpf as calculated using dendro.resolution.

shapeSensitivity

a numeric specifying a time window, defined as proportion of a single day. Within this time window possible extrema points (i.e. minimum and maximum) in dendrometer measurements are searched for. Defaults to 0.6 (60% of a day). See details for further explanation.

minmaxDist

a numeric specifying the minimum temporal distance between consecutive minimum and maximum points (i.e. in the x direction). Defaults to 0.2 (20% of a day).

minmaxSD

a numeric specifying the minimum difference between consecutive minimum and maximum points expressed as a number of standard deviations (i.e. in the y direction). Defaults to 2.

radialIncrease

a character string of "max", "min", "mid", specifying when the stem-radius increment phase should start, with "max" as the most, and "min" as the least conservative approach; "mid" is in between. See details for further explanation.

na.omit

a logical opperator statement of either TRUE or FALSE, specifying weather or not to remove NA values from final dataset. The default is set to na.omit = TRUE.

Value

The function returns a data.frame containing the following summary statistics:

dmID

dendrometer ID.

Phase

cyclic phase (1: contraction, 2: expansion, 3: stem-radius increment, 4: full cycle).

timestamp

timestamp indicating the date and time of phase stage.

Author(s)

Brent Thorne

Examples

1
2
3
4
library(dendrometeR)
data(dmCD)
dm.phase <- phase_def(dmCD)
dm.cellphase <- gg_cellphase_data(dmCD)

brentthorne/ggdendrometeR documentation built on May 14, 2019, 3:09 a.m.