Arguments
- run
The numerical value of the folder in
pathcontaining run results- path
include Path to the folder containing the raw results of the run. Default is the current working directory. .
- file
Default is "PMout.Rdata", which is created after a Pmetrics run, but it could also be the name of an .Rdata file created by running the
$savemethod for a PM_result object.
Value
An R6 PM_result.
Details
A combination of run, path, and file are used to locate the results.
If
runis provided, it is assumed that the results are in a subfolder/outputsof the folder named byrunwithin thepathfolder.If
runis missing, the results are assumed to be in thepathfolder.The
filename is the name of the Rdata file containing the results. Default is "PMout.Rdata", which is created by Pmetrics after a run.If both
runandpathare missing, the current working directory is used forpath.If both
runandfileare missing, the current working directory is used forpathand "PMout.Rdata" is used forfile.If both
pathandfileare missing, the current working directory is used forpathandrunis required.If all three are missing, the current working directory is used for
pathand "PMout.Rdata" is used forfile.
Examples
if (FALSE) { # \dontrun{
run1 <- PM_load(1)
# loads from ./1/outputs/PMout.Rdata, where "." is the current working directory
run2 <- PM_load(2, path = "Pmetrics/MyRuns")
# loads from Pmetrics/MyRuns/2/outputs/PMout.Rdata
run3 <- PM_load(path = "Pmetrics/MyRuns/3", file = "MyResults.Rdata")
# loads from Pmetrics/MyRuns/3/MyResults.Rdata
run4 <- PM_load(file = "Pmetrics/MyRuns/4/outputs/PMout.Rdata")
# loads from Pmetrics/MyRuns/4/outputs/PMout.Rdata
run5 <- PM_load()
# loads from ./PMout.Rdata
} # }