R/gmt.system.R

Defines functions gmt.system

Documented in gmt.system

gmt.system <- function(cmd, file=NULL, append=FALSE)
{
  output <- system(cmd, intern=TRUE)
  open <- if(append) "a" else "w"  # append or write

  if(is.character(file))
  {
    con <- file(file, open)
    writeLines(output, con)
    close.connection(con)
  }

  invisible(output)
}

Try the gmt package in your browser

Any scripts or data that you put into this service are public.

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