as.bathy: 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)
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.
Arguments
x
Object of RasterLayer or SpatialGridDataFrame, or a three-column data.frame with longitude (x), latitude (y) and depth (z) (no default)
Author
Benoit Simon-Bouhet
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).
# load NW Atlantic datadata(nw.atlantic)
# use as.bathyatl <- as.bathy(nw.atlantic)
# class "bathy"class(atl)
# summarize data of class "bathy"summary(atl)