handle_greenhouse | R Documentation |
chillR
formatThis function is to handle weather data obtained from the greenhouses located in Campus Klein Altendorf. For now, this works for input files stored as '.xls' or '.xlsx' format
handle_greenhouse( path_data, time_step = "hourly", vars = c("Temp", "Humidity", "CO2"), check_data = T, n_hours = 24, threshold = 10, fix_data = T, na_strings = c("FAULT", "") )
path_data |
Character string. This is the directory in which the data is stored. It is important to note that the file must have either '.xls' or '.xlsx' extension |
time_step |
Character string. This is the time step in which the data must be retrieved. It has two options; 'hourly' (the default) and 'daily' |
vars |
Character string. Variables that must be retrieved by the function. In general, the options are
'Temperatures', 'Humidity', and 'CO2 concentration'. Regarding 'Temperatures',
the options differed depending on the |
check_data |
Boolean parameter to check the observations for inconsistencies. Unfortunately,
the dataloggers in the greenhouses often define missing records as 0. This makes exremely complicated
to know if one record was actually 0 or missing. This check for that inconsistency by comparing the
temperature at a given hour 'x' with the mean for the previous hours (defined by the |
n_hours |
Numeric input. This is the number of previous hours used to compute the mean and to check for inconsistencies. Default is set to 24 hours |
threshold |
Numeric input. This is the limit to define whether the record was a true observation or not. Default is set to 10 celsius degree since greenhouse temperatures are controlled |
fix_data |
Boolean parameter. If |
na_strings |
Character vector of strings to interpret as missing values. By default,
|
In the 'daily' mode, this function can returns the variables 'Tmin', 'Tmean' and 'Tmax'. In contrast, under the 'hourly' mode, it can returns the mean temperature for each hour as 'Temp'
# As each user has different path for the folder this example is not running until "#" # is removed # path <- "C:/Users/...../...." # handle_greenhouse(path_data = path, time_step = "daily", vars = c("Tmin", "Tmax"), # check_data = T, n_hours = 12, threshold = 5, fix_data = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.