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)
}
arnima-github/gmt documentation built on April 21, 2023, 7:12 p.m.