mc_read_long: Reading data from long data.frame

View source: R/read.R

mc_read_longR Documentation

Reading data from long data.frame

Description

This is universal function designed to read time series and values from long data.frame to myClim object.

Usage

mc_read_long(data_table, sensor_ids = list(), clean = TRUE, silent = FALSE)

Arguments

data_table

long data.frame with Columns:

  • locality_id - character; id of locality

  • sensor_name - can be any character string, recommended are these: names(mc_data_sensors)

  • datetime - POSIXct in UTC timezone is required

  • value

sensor_ids

list with relations between sensor_names and sensor_ids (default list()); sensor_id is key from names(mc_data_sensors). E.g., sensor_ids <- list(precipitation="real", maxAirT="T_C") If sensor_name is the same as sensor_id does not have to be provided.

clean

if TRUE, then mc_prep_clean is called automatically while reading (default TRUE)

silent

if TRUE, then any information is not printed in console (default FALSE)

Details

Similar like mc_read_wide but is capable to read multiple sensors from single table. Useful for data not coming from supported microclimatic loggers. E.g. meteorological station data. By default data are cleaned with function mc_prep_clean().

Value

myClim object in Raw-format

See Also

mc_read_wide


myClim documentation built on Oct. 21, 2024, 5:07 p.m.