Last data update: 2014.03.03

R: Removes/cleans files and folders that have been saved
SimCleanR Documentation

Removes/cleans files and folders that have been saved

Description

This function is mainly used in pilot studies where results and datasets have been temporarily saved by runSimulation but should be removed before beginning the full Monte Carlo simulation (e.g., remove files and folders which contained bugs/biased results).

Usage

SimClean(..., dirs = NULL, generate_data = FALSE, results = FALSE,
  seeds = FALSE, temp = FALSE, save_details = list())

Arguments

...

one or more character objects indicating which files to remove. Used to remove .rds files which were saved with saveRDS or when using the save and filename inputs to runSimulation

dirs

a character vector indicating which directories to remove

generate_data

logical; remove the .rds data-set files saved when passing save_generate_data = TRUE?

results

logical; remove the .rds results files saved when passing save_results = TRUE?

seeds

logical; remove the seed files saved when passing save_seeds = TRUE?

temp

logical; remove the temporary file saved when passing save = TRUE?

save_details

a list pertaining to information about how and where files were saved (see the corresponding list in runSimulation)

See Also

runSimulation

Examples

## Not run: 

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

# remove default temp file
SimClean(temp = TRUE)

# remove default saved-data directory
SimClean(generate_data = TRUE)

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


## End(Not run)

Results