This function converts myClim object to the R data.frame with values of sensor in wide format.
mc_reshape_wide(
data,
localities = NULL,
sensors = NULL,
use_utc = TRUE,
show_logger_name = FALSE
)
myClim object see myClim-package
names of localities; if NULL then all (default NULL)
names of sensors; if NULL then all (default NULL) see names(mc_data_sensors)
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
if TRUE, the logger name is included in the column name (default FALSE)
data.frame with columns:
datetime
locality1_sensor1
...
...
localityn_sensorn
First column of the output data.frame is datetime followed by the columns for every sensor. Name of the column is in format:
localityid_loggerid_serialnumber_sensorname for Raw-format and show_logger_name=FALSE
localityid_loggername_sensorname for Raw-format and show_logger_name=TRUE
localityid_sensorname for Agg-format
The less complex wide table is returned when exporting single sensor ascross localities.