Learn R Programming

marmap (version 1.0.10)

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).

See Also

summary.bathy, plot.bathy, read.bathy, as.xyz, as.raster, as.SpatialGridDataFrame.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab