| as.raster | R Documentation |
Transforms an object of class bathy to a raster layer.
as.raster(bathy)
bathy |
an object of class |
as.raster transforms bathy objects into objects of class RasterLayer as defined in the raster package. All methods from the raster package are thus available for bathymetric data (e.g. rotations, projections...).
An object of class RasterLayer with the same characteristics as the bathy object (same longitudinal and latitudinal ranges, same resolution).
Benoit Simon-Bouhet
as.xyz, as.bathy, as.SpatialGridDataFrame
# load Hawaii bathymetric data
data(hawaii)
# use as.raster
r.hawaii <- as.raster(hawaii)
# class "RasterLayer"
class(r.hawaii)
# Summaries
summary(hawaii)
summary(r.hawaii)
# structure of the RasterLayer object
str(r.hawaii)
## Not run:
# Plots
#require(raster)
plot(hawaii,image=TRUE,lwd=.2)
plot(r.hawaii)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.