corr_dendro_L2: Manually Correct Processed Dendrometer Data

Description Usage Arguments Value See Also Examples

View source: R/corr_dendro_L2.R

Description

corr_dendro_L2 corrects remaining errors in cleaned L2 dendrometer data. The function can be used to manually correct remaining errors that cannot be removed by adjusting the input parameter values in proc_dendro_L2. The function can reverse erroneously introduced changes or force changes that were not automatically made.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
corr_dendro_L2(
  dendro_L1 = NULL,
  dendro_L2,
  reverse = NULL,
  force = NULL,
  delete = NULL,
  series = NULL,
  n_days = 5,
  plot = TRUE,
  plot_export = TRUE,
  tz = "UTC"
)

Arguments

dendro_L1

time-aligned dendrometer data as produced by proc_L1. Optional, only needed for reverse and if plot = TRUE.

dendro_L2

cleaned dendrometer data as produced by proc_dendro_L2.

reverse

numeric vector, specify ID numbers of the changes that should be reversed. ID numbers are reported in the plots produced by proc_dendro_L2 or plot_proc_L2 with the argument plot_period = "monthly".

force

character vector, specify the dates after which jumps/shifts should be corrected. The largest value difference occurring in a period of n_days after the specified dates in force is corrected. Dates need to be in a standard date or datetime format (e.g. %Y-%m-%d %H:%M:%S).

delete

character vector, specify pairs of dates between which all dendrometer data will be deleted (i.e. 4 dates will result in two periods: 1-2 and 3-4 in which data is deleted). Dates need to be in the same standard date or datetime format (e.g. %Y-%m-%d %H:%M:%S).

series

character, specify the name of a single dendrometer series for which changes should be made. Data of other series is left unchanged. Not needed if only a single series is provided.

n_days

numeric, length of the period (in days) following the dates specified in force in which a jump/shift is corrected. Increase if the gap in data is longer than the default (n_days = 5).

plot

logical, specify whether implemented changes should be plotted.

plot_export

logical, specifies whether the plots are exported as a PDF file to the working directory or are plotted in the console.

tz

specify the desired time zone. Default is "UTC".

Value

The function returns a data.frame with corrected L2 dendrometer data. The corrections are documented in the column flags.

See Also

corr_dendro_L1 to correct L1 data.

Examples

1
2
3
4
corr_dendro_L2(dendro_L1 = dendro_data_L1, dendro_L2 = dendro_data_L2,
               reverse = 59:61, force = "2013-08-12",
               delete = c("2013-08-01", "2013-08-04"),
               series = "site-1_dendro-3", plot_export = FALSE)

treenet/treenetproc documentation built on June 16, 2021, 4:39 p.m.