robust_system: System calls and stderr stdout reporting

View source: R/system_calls.R

robust_systemR Documentation

System calls and stderr stdout reporting

Description

Robustly pass commands to system() and capture stderr and stdout data

Usage

robust_system(command)

Arguments

command

[Required] String that is passed directly to the base::system() command.

Value

A list of length 3. list[[1]] is the exit code for the command. list[[2]] is the "stdout" text. list[[3]] is the "stderr" text.

This function was mostly copied from: [https://stackoverflow.com/a/17090601/2367748](https://stackoverflow.com/a/17090601/2367748)

See Also

[robust_system_check()]

Examples

robust_list <- robust_system("date; cal")


toddknutson/toddr documentation built on Aug. 28, 2023, 2:45 a.m.