Commit 08f9e6d3 authored by Dorchies David's avatar Dorchies David
Browse files

fix(convert_sic_param): add missing funciton for `sic_run_fortran`

Refs #2
1 merge request!2Resolve "Import initial conditions from a result to a new scenario/variant"
Showing with 38 additions and 0 deletions
+38 -0
# Generated by roxygen2: do not edit by hand # Generated by roxygen2: do not edit by hand
export(convert_sic_params)
export(loadConfig) export(loadConfig)
export(set_initial_conditions) export(set_initial_conditions)
export(sic_run_fortran) export(sic_run_fortran)
#' Convert a list of parameters into command line arguments
#'
#' @param params a [list] of [character] with each item is identified by
#' @param cfg
#'
#' @return A [character] with each parameter is converted to "[key param]=[value param]" and each parameter separated by a space character.
#' @export
#'
#' @examples
convert_sic_params <- function(params, cfg = loadConfig()) {
if (!"INTERF" %in% names(params)) {
params <- c(list(INTERF = cfg$sic$fortran$prms$INTERF), params)
}
params <- sapply(names(params), function(key) {
paste(key, params[[key]], sep= "=")
})
paste(params, collapse = " ")
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert_sic_params.R
\name{convert_sic_params}
\alias{convert_sic_params}
\title{Convert a list of parameters into command line arguments}
\usage{
convert_sic_params(params, cfg = loadConfig())
}
\arguments{
\item{params}{a \link{list} of \link{character} with each item is identified by}
\item{cfg}{}
}
\value{
A \link{character} with each parameter is converted to "\link{key param}=\link{value param}" and each parameter separated by a space character.
}
\description{
Convert a list of parameters into command line arguments
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment