| grid.to.xyz | R Documentation | 
Convert a grid matrix to a (x,y,z) data.frame.
grid.to.xyz(data, header, varname = "z", colnames = c("x", "y", varname))
| data | grid data: either a grid data matrix, or a list with components  | 
| header | optional list giving grid header information; see  | 
| varname | character: name to be assigned to the column with the z values in the output data.frame | 
| colnames | names to be given to the columns corresponding to the x and y coordinates and the grid variable in the output data.frame | 
a data.frame with three columns (names are specified in the colnames argument) giving the x and y coordinates and the attribute values at the locations given by the grid data.
read.ascii.grid(), pick.from.ascii.grid()
## Not run: 
d = read.ascii.grid("dem")
xyz = grid.to.xyz(d,varname="elevation")
str(xyz)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.