R: Read the result object from the output file, or the error

get_result {callr} | R Documentation

## Read the result object from the output file, or the error

### Description

Even if an error happens, the ouput file might still exist, because saveRDS creates the file before evaluating its object argument. So we need to check for the error file to decide if an error happened.

### Usage

    get_result(res)

### Arguments

`res` | Name of the result file to read. For the error file, `".error"` is appended.

### Value

If no error happened, the result is returned. Otherwise we handle the error.

[Package callr version 1.0.0 Index]