systemf: Execute formatted string in system

Description Usage Arguments Value References Examples

View source: R/General.R

Description

This is just a wrapper of the system function. It comfortably allows for using C-style formatting in the commands, making the calls more readable.

Usage

1
2
3
4
5
6
7
8
systemf(
  string,
  ...,
  logfile = NULL,
  intern = FALSE,
  ignore.stdout = FALSE,
  dry.run = FALSE
)

Arguments

string

Command pattern. Use %s for string slots

...

Substrings to fill each instance of %s

logfile

(Default = NULL) Text file to log input and exit status. Useful for debugging

intern

(Default = FALSE) FALSE returns the exit status. TRUE the output

ignore.stdout

(Default = FALSE) Ignore stdout and stderr

dry.run

(Default = FALSE) Set true for returning command without executing

Value

With default values, returns void. The command executes in the background

References

https://github.com/RETURN-project/makeDataCube/issues/28

Examples

1
2
3
4
## Not run: 
systemf("tar -xvzf %s -C %s", wvpCompressed, wvpfolder)

## End(Not run)

RETURN-project/makeDataCube documentation built on Feb. 11, 2022, 3:04 p.m.