% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SimClean.R
\name{SimClean}
\alias{SimClean}
\title{Removes/cleans files and folders that have been saved}
\usage{
SimClean(
  ...,
  dirs = NULL,
  temp = TRUE,
  results = FALSE,
  seeds = FALSE,
  save_details = list()
)
}
\arguments{
\item{...}{one or more character objects indicating which files to remove. Used to remove
temp files that were saved, or for removing specific file names}

\item{dirs}{a character vector indicating which directories to remove}

\item{temp}{logical; remove the temporary file saved when passing \code{save = TRUE}?}

\item{results}{logical; remove the \code{.rds} results files
saved when passing \code{save_results = TRUE}?}

\item{seeds}{logical; remove the seed files
saved when passing \code{save_seeds = TRUE}?}

\item{save_details}{a list pertaining to information about how and where files were saved
(see the corresponding list in \code{\link{runSimulation}})}
}
\description{
This function is mainly used in pilot studies where results and datasets have been temporarily saved
by \code{\link{runSimulation}} but should be removed before beginning the full
Monte Carlo simulation (e.g., remove files and folders which contained bugs/biased results).
}
\examples{
\dontrun{

# remove file called 'results.rds'
SimClean('results.rds')

# remove default temp file
SimClean()

# remove customized saved-results directory called 'mydir'
SimClean(results = TRUE, save_details = list(save_results_dirname = 'mydir'))

}
}
\references{
Chalmers, R. P., & Adkins, M. C.  (2020). Writing Effective and Reliable Monte Carlo Simulations
with the SimDesign Package. \code{The Quantitative Methods for Psychology, 16}(4), 248-280.
\doi{10.20982/tqmp.16.4.p248}

Sigal, M. J., & Chalmers, R. P. (2016). Play it again: Teaching statistics with Monte
Carlo simulation. \code{Journal of Statistics Education, 24}(3), 136-156.
\doi{10.1080/10691898.2016.1246953}
}
\seealso{
\code{\link{runSimulation}}
}
\author{
Phil Chalmers \email{rphilip.chalmers@gmail.com}
}
