Learn R Programming

fz (version 1.2.0)

fzi: fzi Function

Description

Parses input file(s) to find variables, formulas, and static objects.

Usage

fzi(input_path, model, input_static = NULL)

Value

Named list keyed by the discovered static objects, variable names, and formula expressions, mapped to their values (or NULL for variables with no default).

Arguments

input_path

Path to input file or directory.

model

Model definition dict or alias string.

input_static

Optional character vector of files that are identical across every case (see fzr's input_static). They are never scanned for variables, since they are never templated. Default NULL.

Examples

Run this code
# \donttest{
if (fz_available()) {
  tf <- tempfile(fileext = ".txt")
  writeLines(c("pressure = ${P~1.013}", "volume = ${V~22.4}"), tf)

  model <- list(varprefix = "$", delim = "{}", formulaprefix = "@",
                commentline = "#")

  vars <- fzi(tf, model)
}
# }

Run the code above in your browser using DataLab