Skip to contents

Helper to ensure catalog edge cases and incorrect formats are correctly handled (most commonly numeric strings parsed into characters)

Usage

load_catalog_csv_as_DT(path_to_csv, is_quiet = TRUE)

Arguments

path_to_csv

path to the model_catalog.csv file under your catalog folder

is_quiet

if TRUE, function will suppress message, Default: TRUE

Value

returns the model_catalog as a data.table object with enforced column types

Details

a little utility that sets column types on load for some of our sillier edge cases. the vector applied is `data.table::fread(path_to_csv,colClasses = c("nhdplus_comid" = "character","model_name" = "character","units" = "character","crs" = "character","final_name_key" = "character"))`

See also

Examples

if (FALSE) { # \dontrun{
if(interactive()){
 #EXAMPLE1
 ras_catalog_dbase = load_catalog_csv_as_DT(file.path(path_to_ras_dbase, "accounting.csv", fsep = .Platform$file.sep),is_quiet = !is_verbose)
 }
} # }