| r2gmt | R Documentation |
This internal function reads data, from a filename or R object, and writes them to a GMT input file.
r2gmt(x, datafile, append=FALSE)
x |
data frame, matrix, or filename containing the data to be written to a temporary file. |
datafile |
filename where the data will be written in GMT format, tab-separated without header. |
append |
whether data should be appended to an existing file, separating segments with ">" lines. |
If x is a filename, the data should be tabular with or without
a header, separated by commas or whitespace. The first line is
interpreted as header if the first non-whitespace character is not
minus, point, or number.
The data frame that was written to datafile.
r2gmt is like write.table, except it allows x to
be a filename, and appends tables with the GMT > separator.
It is mainly called by other functions, but users may find it useful for writing input data for GMT commands.
scan, read.table, write,
write.table.
gmt-package gives an overview of the package.
LonLat1 <- data.frame(Lon=1:3, Lat=4:6)
LonLat2 <- data.frame(Lon=7:8, Lat=9:10)
## Not run:
r2gmt(LonLat1, "temp.gmt")
r2gmt(LonLat2, "temp.gmt", append=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.