as.xyz <- function(bathy) {
if (!is(bathy, "bathy")) stop("Objet is not of class bathy")
lon <- as.numeric(rownames(bathy))
lat <- as.numeric(colnames(bathy))
xyz <- data.frame(expand.grid(lon,lat),as.vector(bathy))
xyz <- xyz[order(xyz[,2], decreasing=TRUE),]
names(xyz) <- c("V1","V2","V3")
rownames(xyz) <- 1:nrow(xyz)
return(xyz)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.