mc_read_data | R Documentation |
This function has two tables as the parameters.
(i) files_table
is required parameter, it ust contain paths pointing to raw
csv logger files, specification of data format (logger type) and locality name.
(ii) localities_table
is optional, containing locality id and metadata e.g. longitude, latitude, elevation...
mc_read_data(
files_table,
localities_table = NULL,
clean = TRUE,
silent = FALSE,
user_data_formats = NULL
)
files_table |
path to csv file or data.frame object see example with 3 required columns and few optional: required columns:
optional columns:
|
localities_table |
path to csv file ("c:/user/localities.table.csv") or R data.frame see example.
Localities table is optional (default NULL).
The required columns:
optional columns:
|
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) |
user_data_formats |
custom data formats; use in case you have your own logger files not pre-defined in myClim - list(key=mc_DataFormat) mc_DataFormat (default NULL) If custom data format is defined the key can be used in data_format parameter in |
The input tables could be R data.frames or csv files. When loading files_table
and localities_table
from external CSV they must have header, column separator must be comma ",".
If you only need to place loggers to correct localities, files_table
is enough.
If you wish to provide localities additional metadata, you need also localities_table
By default, data are cleaned with the function mc_prep_clean see function description.
mc_prep_clean detects gaps in time-series data,
duplicated records, or records in the wrong order. Importantly, mc_prep_clean
also applies a step parameter if provided. The step parameter can be used either
instead of automatic step detection which can sometime failed, or to prune
microclimatic data. For example, if you have a 15-minute time series but you wish to
keep only one record per hour (without aggregating), you can use step parameter.
However, if a step is provided and clean = FALSE
, then the step is only stored in the
metadata of myClim, and the time-series data is not cleaned, and the step is not applied.
myClim object in Raw-format see myClim-package
mc_DataFormat
files_csv <- system.file("extdata", "files_table.csv", package = "myClim")
localities_csv <- system.file("extdata", "localities_table.csv", package = "myClim")
tomst_data <- mc_read_data(files_csv, localities_csv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.