R: Wrapper for system2 with better return type and...

system3 {BBmisc} | R Documentation

## Wrapper for system2 with better return type and errorhandling.

### Description

Wrapper for `system2` with better return type and errorhandling.

### Usage

    system3(command, args = character(0L), stdout = "", stderr = "",
      wait = TRUE, ..., stop.on.exit.code = wait)

### Arguments

`command` | See `system2`.
`args` | See `system2`.
`stdout` | See `system2`.
`stderr` | See `system2`.
`wait` | See `system2`.
`...` | Further arguments passed to `system2`.
`stop.on.exit.code` | [`logical(1)`] Should an exception be thrown if an exit code greater 0 is generated? Can only be used if `wait` is `TRUE`. Default is `wait`.

### Value

[`list`].

`exit.code [integer(1)]` | Exit code of command. Given if wait is `TRUE`, otherwise `NA`. 0L means success. 127L means command was not found
`output [character]` | Output of command on streams. Only given is `stdout` or `stderr` was set to `TRUE`, otherwise `NA`.

[Package BBmisc version 1.11 Index]