gmt.system {gmt}R 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.

Author(s)

Arni Magnusson arnima@u.washington.edu.

See Also

system, writeLines.

gmt-package gives an overview of the package.

Examples

## Not run: 
gmt.system("gmtdefaults -Ds", file=".gmtdefaults4")

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

[Package gmt version 1.1-2 Index]