read.bathy | R Documentation |
Reads a three-column table containing longitude (x), latitude (y) and depth (z) data.
read.bathy(xyz, header = FALSE, sep = ",", ...)
xyz |
three-column table with longitude (x), latitude (y) and depth (z) (no default) |
header |
whether this table has a row of column names (default = FALSE) |
sep |
character separating columns, (default=",") |
... |
further arguments to be passed to |
Allows direct import of data from the NOAA GEODAS Grid Translator webpage (https://maps.ngdc.noaa.gov/viewers/wcs-client/). To prepare data from NOAA, fill the custom grid form, and choose "XYZ (lon,lat,depth)" as the "Output Grid Format", "No Header" as the "Output Grid Header", and either of the space, tab of comma as the column delimiter (either can be used, but "comma" is the default import format of read.bathy
). Choose "omit empty grid cells" to reduce memory usage.
The output of read.bathy
is a matrix of class bathy
, which dimensions depends on the resolution of the grid uploaded from the NOAA GEODAS server (Grid Cell Size). The class bathy
has its own methods for summarizing and ploting the data.
Eric Pante
summary.bathy
, plot.bathy
, readGEBCO.bathy
# load NW Atlantic data
data(nw.atlantic)
# write example file to disk
write.table(nw.atlantic, "NW_Atlantic.csv", sep=",", quote=FALSE, row.names=FALSE)
# use read.bathy
read.bathy("NW_Atlantic.csv", header=TRUE) -> atl
# remove temporary file
system("rm NW_Atlantic.csv") # remove file, for unix-like systems
# class "bathy"
class(atl)
# summarize data of class "bathy"
summary(atl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.