Learn R Programming

dendRoAnalyst (version 0.1.5)

dendro.truncate: Truncation of the dendrometer data

Description

This function is helpful to truncate dendrometer data for a user-defined period.

Usage

dendro.truncate(df, CalYear, DOY)

Value

A dataframe with the truncated data for the defined periods.

Arguments

df

dataframe with the first column named date and time in the format yyyy-mm-dd HH:MM:SS.

CalYear

numerical value or array of two elements for the desired year of calculation.

DOY

numerical value or array of two elements representing the day of year. If we provide an array instead of a single value for CalYear and a single value for DOY, it truncates data from the DOY of the first CalYear to the same DOY of the second CalYear. Conversely, if we provide one value for CalYear and an array of two elements for DOY truncates the data form first DOY to second DOY within the same CalYear. Finally, if we provide an array with two values for both DOY and CalYear, it truncates data from the first DOY of the first CalYear to the second DOY of second CalYear.

Examples

Run this code
library(dendRoAnalyst)
data(nepa)
#Extracting data from doy 20 to 50 in 2017.
trunc1<-dendro.truncate(df=nepa, CalYear=2017, DOY=c(20,50))
head(trunc1,10)

Run the code above in your browser using DataLab