ffm_read_legacy_params: Reads a legacy format parameters file

View source: R/readLegacyParamFile.R

ffm_read_legacy_paramsR Documentation

Reads a legacy format parameters file

Description

The legacy parameters file format was designed for use with a C++ implementation of the model. It does not conform to any more general format (e.g. json or yaml) and, to be read correctly, relies on implicit assumptions about the relationship between variables. For new parameter sets it is preferable to compose them as tables in R or elsewhere and save them as CSV-format files.

Usage

ffm_read_legacy_params(path, raw = FALSE)

Arguments

path

The full or relative path to the parameters file.

raw

(logical) Whether to return raw parsed data. This can be useful for diagnosing problems with reading a particular parameter file. It should be set to FALSE (default) to return a standard format table of parameters.

Value

If raw is TRUE, a data frame of parsed data in raw form (useful for testing). If raw is FALSE (the default), a data frame in a form suitable for use with ffm_run.

Examples

## Not run: 
# Import a legacy format parameter file and save it as a CSV format file
# in standard tabular parameter format.
params <- ffm_read_legacy_params("old_params.txt")
ffm_write_params(params, file = "beautiful_params.csv")

## End(Not run)


pzylstra/frame_r documentation built on Nov. 12, 2023, 1:55 a.m.