checkpoint {Rqc} | R Documentation

## Save time storing longer analysis step on disk

### Description

This utility function can be used to save time on task that takes long time to complete. A Rda file are written on disk containing only objects setted to keep. If checkpoint function find related Rda file then this Rda will be loaded.

### Usage

    checkpoint(label, CODE, path = ".", overwrite = FALSE,
      verbose = FALSE, keep = NULL)

### Arguments

`label` | name of this code, will create a Rda file with the same name.
`CODE` | R code.
`path` | directory to write/load Rda file.
`overwrite` | Rerun CODE and replace Rda file.
`verbose` | argument passed to load function
`keep` | vector of object/variable name to keep. NULL means error.

### Value

Nothing.

### Note

Experimental function.

### Author(s)

Welliton Souza

### Examples

    checkpoint("Rqc", path=system.file(package="Rqc", "extdata"), {
      folder <- system.file(package="ShortRead", "extdata/E-MTAB-1147")
      files <- list.files(full.names=TRUE, path=folder)
      rqcResultSet <- rqcQA(files, pair=c(1,1), workers=1)
    }, keep="rqcResultSet")

[Package Rqc version 1.20.0 Index]