prep.csv {climodr}R Documentation

Preparing CSV-Data

Description

Crops input data to the extent size and removes NA-Values

Usage

prep.csv(envrmt = .GlobalEnv$envrmt, method = "proc", save_output = TRUE, ...)

Arguments

envrmt

variable name of your envrmt list created using climodr's 'envi.create' function. Default = envrmt.

method

character. "proc" for ready-to-use data in separate .csv-files. "tube" for raw-data from the Tube Data Base. Default "proc"-Method.

save_output

logical. If cleaned data should be saved permanently in the Environment put save_output = TRUE. Otherwise the output will be saved in the temporary directory. Default: FALSE.

...

arguments passed down from other functions.

Value

List

See Also

'proc.csv', 'spat.csv', 'fin.csv'

Examples

#create climodr environment and allow terra-functions to use 70% of RAM
envrmt <- envi.create(proj_path = tempdir(),
                      memfrac = 0.7)

# Load the climodr example data into the current climodr environment
clim.sample(envrmt = envrmt)

#prepare csv-files
prep.csv(envrmt = envrmt,
         method = "proc",
         save_output = TRUE)

#check the created csv files
csv_files <- grep("_no_NAs.csv$",
                  list.files(envrmt$path_tworkflow),
                  value=TRUE)
csv_files


[Package climodr version 1.0.0 Index]