% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PM_result.R
\name{PM_load}
\alias{PM_load}
\title{Load Pmetrics NPAG or IT2B output}
\usage{
PM_load(run, path = ".", file = "PMout.Rdata")
}
\arguments{
\item{run}{The numerical value of the folder in \code{path} containing run results}

\item{path}{include Path to the folder containing the raw results of the run. Default is the current working directory.
.}

\item{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
\verb{$save} method for a \link{PM_result} object.}
}
\value{
An R6 \link{PM_result}.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}
Loads all the data from a prior Pmetrics run.
}
\details{
A combination of \code{run}, \code{path}, and \code{file} are used to locate the results.
\itemize{
\item If \code{run} is provided, it is assumed that the results are in a subfolder
\verb{/outputs} of the folder named by \code{run} within the \code{path} folder.
\item If \code{run} is missing, the results are assumed to be in the \code{path} folder.
\item The \code{file} name is the name of the Rdata file containing the results.
Default is "PMout.Rdata", which is created by Pmetrics after a run.
\item If both \code{run} and \code{path} are missing, the current working directory is used
for \code{path}.
\item If both \code{run} and \code{file} are missing, the current working directory is used
for \code{path} and "PMout.Rdata" is used for \code{file}.
\item If both \code{path} and \code{file} are missing, the current working directory is used
for \code{path} and \code{run} is required.
\item If all three are missing, the current working directory is used for \code{path}
and "PMout.Rdata" is used for \code{file}.
}
}
\examples{
\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
}

}
\seealso{
\link{PM_final},
\link{PM_cycle}, \link{PM_op}, \link{PM_cov},
\link{PM_pop}, \link{PM_post}
}
\author{
Michael Neely and Julian Otalvaro
}
