| SimToPar | R Documentation |
Update par.txt with values from an allsim.txt or bestsims.txt file
AllSimToPar(simfile, row, par)
BestSimsToPar(simfile, row, par)
simfile |
Imported allsim.txt or bestsims.txt file imported as data frame. |
row |
Integer, row number indicating row containing the parameter values that should be replaced/added to |
par |
Imported par.txt file that should be updated using parameter values from |
AllSimToPar and BestSimsToPar can be used to update an existing par.txt file with the parameter values from a HYPE allsim.txt or bestsims.txt file.
If a parameter in the allsim or bestsims file already exists in par, then the parameter values will be overwritten in par. If the parameter does not exist,
then the parameter will be added to the bottom of the output.
AllSimToPar and BestSimsToPar return a list of named vectors in the format used by ReadPar.
ReadPar for HYPE par.txt import; WritePar to export HYPE par.txt files
simfile <- read.table(file = system.file("demo_model", "results",
"bestsims.txt",
package = "HYPEtools"
), header = TRUE, sep = ",")
par <- ReadPar(filename = system.file("demo_model", "par.txt", package = "HYPEtools"))
BestSimsToPar(simfile, 1, par)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.