check_temperature_record function

Check a daily or hourly temperature record for compliance with chillR's standards

Check a daily or hourly temperature record for compliance with chillR's standards

This function performs basic tests to determine whether a temperature record complies with chillR's formatting rules. If desired, the function also checks whether the record is complete (has rows for all time units in the interval) and how many values are missing.

check_temperature_record( weather, hourly = FALSE, completeness_check = TRUE, no_variable_check = FALSE )

Arguments

  • weather: object to be tested for whether it contains chillR-compatible temperature data.
  • hourly: boolean parameter indicating whether temp_record contains hourly data. If not, it is assumed to consist of daily records (the default).
  • completeness_check: boolean parameter indicating whether the records should be checked for completeness.
  • no_variable_check: boolean parameter to indicate whether the function should check if the dataset contains the usual chillR temperature variables. Defaults to TRUE, but should be set to FALSE for different data formats.

Returns

list containing the following elements: 'data_frequency' ("daily or "hourly), 'weather_object' (boolean, indicates whether records are in a sub-object called weather), 'chillR_compliant' (boolean, indicates whether the object was found to conform to chillR format standards) and 'error' (contains error messages generated during the checking procedure).

Note

This function doesn't check whether there are faulty data. It only tests whether the data is compatible with the requirements of chillR's major functions.

Examples

check_temperature_record(KA_weather)

References

The chillR package:

Luedeling E, Kunz A and Blanke M, 2013. Identification of chilling and heat requirements of cherry trees - a statistical approach. International Journal of Biometeorology 57,679-689.

Author(s)

Eike Luedeling

  • Maintainer: Eike Luedeling
  • License: GPL-3
  • Last published: 2024-11-14

Useful links