as.bathy {marmap} | R Documentation |
Convert to bathymetric data in an object of class bathy
Description
Reads either an object of class RasterLayer
, SpatialGridDataFrame
or a three-column data.frame containing longitude (x), latitude (y) and depth (z) data and converts it to a matrix of class bathy.
Usage
as.bathy(x)
Arguments
x |
Object of |
Details
x
can contain data downloaded from the NOAA GEODAS Grid Translator webpage (http://www.ngdc.noaa.gov/mgg/gdas/gd_designagrid.html) in the form of an xyz table. The function as.bathy
can also be used to transform objects of class raster
(see package raster
) and SpatialGridDataFrame
(see package sp
).
Value
The output of as.bathy
is a matrix of class bathy
, which dimensions and resolution are identical to the original object. The class bathy
has its own methods for summarizing and ploting the data.
Author(s)
Benoit Simon-Bouhet
See Also
summary.bathy
, plot.bathy
, read.bathy
, as.xyz
, as.raster
, as.SpatialGridDataFrame
.
Examples
# load NW Atlantic data
data(nw.atlantic)
# use as.bathy
atl <- as.bathy(nw.atlantic)
# class "bathy"
class(atl)
# summarize data of class "bathy"
summary(atl)