read_params_table: Getting parameters data from tables files (Excel sheet, csv)

View source: R/read_params_table.R

read_params_tableR Documentation

Getting parameters data from tables files (Excel sheet, csv)

Description

Getting parameters data from tables files (Excel sheet, csv)

Usage

read_params_table(
  file,
  sheet_name = NULL,
  num_na = "NA",
  char_na = "NA",
  file_path = lifecycle::deprecated()
)

Arguments

file

Excel or csv file path (including name of the file)

sheet_name

Name of an Excel sheet (useless for csv files)

num_na

Replacement value for numerical NA values (default: NA)

char_na

Replacement value for character NA values (default: "")

file_path

[Deprecated] file_path is no longer supported, use file instead.

Details

After data are loaded, numerical and string NA values are replaced respectively with num_na or char_na

Value

A tibble of parameters

Examples


usm_xl_file <- download_usm_xl(
  file = "inputs_stics_example.xlsx",
  verbose = FALSE
)
read_params_table(usm_xl_file, sheet = "USMs")
usm_csv_file <- download_usm_csv(
  file = "inputs_stics_example_USMs.csv",
  verbose = FALSE,
  stics_version = "V9.2"
)
read_params_table(file = usm_csv_file)

SticsRFiles documentation built on Sept. 12, 2024, 7:41 a.m.