create_data | R Documentation |
BD_Obs
structure) by merging multiple CSV files,
each containing in-situ observations from different stations. The function standardizes the format
required by downstream interpolation or bias correction algorithms by aligning all station data
into a single data.table
, with dates as rows and station identifiers as columns.Each input CSV file must contain exactly two columns: the first with dates (Date
) and the second
with the in-situ measurements of the variable to be interpolated.
create_data(file.path, Start_date, End_Date, ncores = NULL, max.na = NULL)
file.path |
|
Start_date |
|
End_Date |
|
ncores |
|
max.na |
|
If max.na
is NULL
, the function returns a data.table
structured in the BD_Obs
format,
where the first column contains the dates and the remaining columns correspond to individual stations.
This format preserves the full dataset without filtering for missing values.
If max.na
is not NULL
, the function returns a named list containing:
data
A data.table
in the BD_Obs
format that includes only stations with a percentage
of missing values less than or equal to max.na
.
Na_stations
A data.table
summarizing the percentage of missing values for each station,
useful for assessing data quality and supporting decisions about station selection.
Jonnathan Augusto landi Bermeo, jonnathan.landi@outlook.com
# Example usage
file.path <- system.file("extdata/Folds_ejs_create_data", package = "InterpolateR")
# Create a data with all stations
data <- create_data(file.path, Start_date = "2015-01-01", End_Date = "2015-03-01", ncores = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.