| mc_reshape_wide | R Documentation |
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
)
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 |
use_utc |
if FALSE, then the time shift from In the Agg-format myClim object |
show_logger_name |
if TRUE, the logger name is included in the column name (default FALSE) |
First column of the output data.frame is datetime followed by the columns for every sensor. When reshaping uncleaned data in Raw-format, only one logger per myClim object is allowed to avoid potential confusion in case, there are duplicated values, allowed in uncleaned Raw myClim format. Name of the column is in format:
localityid_loggerid_serialnumber_sensorname for Raw-format and show_logger_name=FALSE
localityid_loggername_sensornamefor Raw-format and show_logger_name=TRUE
localityid_sensorname for Agg-format
The less complex wide table is returned when exporting single sensor across localities.
data.frame with columns:
datetime
locality1_sensor1
...
...
localityN_sensorN
example_tms_wideformat <- mc_reshape_wide(mc_data_example_clean, c("A6W79", "A2E32"),
c("TMS_T1", "TMS_T2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.