% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/retrieve.R
\name{retrieve_var}
\alias{retrieve_var}
\title{Retrieve saved variable}
\usage{
retrieve_var(job_id, job_name = NULL, wait = 30)
}
\arguments{
\item{job_id}{A single job ID.}

\item{job_name}{A single job name. Since jobs may have the same names, the most recent job is selected.}

\item{wait}{Seconds to wait until the job is finished.}
}
\value{
The retrieved object.
}
\description{
Retrieve saved variable
}
\details{
It retrieves the saved variable in \code{\link[=bsub_chunk]{bsub_chunk()}} when \code{save_rds = TRUE} is set.
}
\examples{
\dontrun{
job_id = bsub_chunk(name = "example", save_var = TRUE,
{
    Sys.sleep(10)
    1+1
})
retrieve_var(job_id)
}
}
