handle_tinytag: Get weather data from Tinytag sensors in 'chillR' format

View source: R/handle_tinytag.R

handle_tinytagR Documentation

Get weather data from Tinytag sensors in chillR format

Description

This function returns weather data (temperature and humidity) from tinytag sensors (model TGP-4500). It also contains options to check for missing observations and fill them through linear interpolation.

Usage

handle_tinytag(
  path_data,
  vars = c("Temp", "Humidity"),
  time_step = "hourly",
  check_data = F,
  latitude = NULL,
  ...
)

Arguments

path_data

Character string. This is the directory in which the data is stored. It is important to note that the file must be in ".csv" or ".xlsx" format

vars

Character string. Climate related variables that will be returned by the function. It has two options for temperature according to the time_step parameter.Tmin, Tmean and Tmax only work for daily observations. Temp works for hourly observations. The Humidity is also possible to obtain. Default is set to "Temp" and "Humidity"

time_step

Character string. This is the time step in which the data must be obtained. Default is set to "hourly"

check_data

Boolean parameter to decide whether the data should be quality checked or not. If so, it uses chillR::interpolate_gaps_hourly to fill the gaps. Default is FALSE

latitude

Numeric vector. If the check_data parameter is used, this is to fill the gaps by linear interpolation according to the latitude of the place. Default is NULL

...

Additional arguments passed to read.csv. Specially useful when csv files have different separators. See sep argument in read.csv

Details

This function has an option to fill the gaps through linear interpolation. However, this step is ONLY recommended if the sensor was placed in normal environmental conditions. Otherwise, the values used to fill the gaps are not representative of the conditions measured with the datalogger.

Examples


# As each user has different path for the folder this example is not running until "#"
# is removed

# path <- "C:/Users/...../...."

# handle_tinytag(path_data = path, vars = c("Tmin", "Tmean", "Tmax"),
# time_step = "daily", check_data = T, latitude = 50.62, sep = NULL)


EduardoFernandezC/dormancyR documentation built on Aug. 24, 2022, 7:21 a.m.