mc_reshape_long: Export values to long table

View source: R/reshape.R

mc_reshape_longR Documentation

Export values to long table

Description

This function converts myClim object to long R data.frame.

Usage

mc_reshape_long(data, localities = NULL, sensors = NULL, use_utc = TRUE)

Arguments

data

myClim object see myClim-package

localities

names of localities; if NULL then all (default NULL)

sensors

names of sensors; if NULL then all (default NULL) see names(mc_data_sensors)

use_utc

if FALSE, then the time shift from tz_offset metadata is used to correct (shift) the output time-series (default TRUE)

In the Agg-format myClim object use_utc = FALSE is allowed only for steps shorter than one day. In myClim the day nd longer time steps are defined by the midnight, but this represent whole day, week, month, year... shifting daily, weekly, monthly... data (shift midnight) does not make sense in our opinion. But when user need more flexibility, then myClim Raw-format can be used, In Raw-format use_utc is not limited, user can shift an data without the restrictions. See myClim-package

Value

data.frame

columns:

  • locality_id

  • serial_number

  • sensor_name

  • height

  • datetime

  • time_to

  • value

Examples

head(mc_reshape_long(mc_data_example_clean, c("A6W79", "A2E32"), c("TMS_T1", "TMS_T2")), 10)

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