gmt.system: Invoke shell command

View source: R/gmt.system.R

gmt.systemR Documentation

Invoke shell command

Description

This internal function invokes a shell command, possibly directing the output to a file.

Usage

gmt.system(cmd, file=NULL, append=FALSE)

Arguments

cmd

system command to be invoked, as a string.

file

filename to which output should be directed.

append

whether output should be appended to existing file.

Value

Command output as a vector of strings.

Note

gmt.system is a fast platform-independent wrapper for system, supporting redirection to file.

It is mainly called by other functions, but users may find it useful for running various GMT commands.

See Also

system, writeLines.

gmt-package gives an overview of the package.

Examples

## Not run: 
# Assuming bermuda.nc is in R working directory
gmt.system("gmt grdcontour bermuda.nc -JM7i -C250 -A1000 -B2", file="b.ps")

## End(Not run)

gmt documentation built on June 7, 2022, 1:11 a.m.