write_pyDarwinOptions {Certara.RDarwin} | R Documentation |
Write pyDarwin options to a JSON file.
Description
This function takes a list of pyDarwin options and writes them to a JSON file
in the specified format. The options can be generated using the
create_pyDarwinOptions
function or customized manually. The resulting JSON
file can be used as input for a pyDarwin model search.
Usage
write_pyDarwinOptions(
pyDarwinOptions = create_pyDarwinOptions(),
file = "options.json",
pretty = TRUE,
digits = NA,
auto_unbox = TRUE
)
Arguments
pyDarwinOptions |
A list containing the pyDarwin options to be written
to the JSON file. Default is the result of calling |
file |
Character: The path to the JSON file where the options will be written. Default is a file named "options.json" in the current working directory. |
pretty |
adds indentation whitespace to JSON output. Can be TRUE/FALSE or a number specifying the number of spaces to indent. See |
digits |
max number of decimal digits to print for numeric values. Use |
auto_unbox |
automatically |
Value
None (invisible NULL
).
Examples
# Write pyDarwin options to a JSON file
Options <-
create_pyDarwinOptions(author = "John Doe",
algorithm = "GA",
population_size = 10)
write_pyDarwinOptions(Options,
file = file.path(tempdir(), "options.json"))