gg_cellphase: Create's a ggplot for dendrometer cell phase data.

Description Usage Arguments Value Author(s) Examples

View source: R/gg_cellphase.R

Description

Can be displayed as a single plot or as a facet wrap for each unique dendrometer.

Usage

1
gg_cellphase(gg_cellphase_data, start.day, end.day, date_breaks, date_labels, type = "all")

Arguments

gg_cellphase_data

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

start.day

a timestamp specifying the begining of dendrometer data to be used in the final plot timestamp format is (%Y-%m-%d %H:%M:%S format).

end.day

a timestamp specifying the end of dendrometer data to be used in the final plot timestamp format is (%Y-%m-%d %H:%M:%S format).

date.breaks

a string giving the distance between breaks such as: "2 weeks", or "10 years".

date.labels

a string giving the formatting specification for the labels. Codes are defined in strftime. If both labels and date_labels are specified, date_labels wins.

type

a string specifying either 1) the default type = "all"; a single plot with all dendrometer data on it, or 2) type = "facet"; if the plot should be displayed based on the number of dendrometers used within the users origional data frame.

Value

The function returns a geom_point plot or can be stored as an object.

Author(s)

Brent Thorne

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#plot all on one
library(dendrometeR)
data(dmCD)
dm.phase <- phase_def(dmCD)
dm.cellphase <- gg_cellphase_data(dmCD)
gg_cellphase(gg_cellphase_data = dm.cellphase)

#plot facet for each dendrometer
library(dendrometeR)
data(dmED)
dmED <- fill_gaps(dmED)
dm.phase <- phase_def(dmED)
dm.cellphase <- gg_cellphase_data(dmED)
gg_cellphase(gg_cellphase_data = dm.cellphase, type = "facet")

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