This function returns a data frame with the column number (x), row number (y) and cell value (z) of each pixel in a raster.

aue.image2df(mat, origin = c("upperleft", "lowerleft"),
  out = c("data.frame", "matrix"))

Arguments

mat

Input raster matrix.

origin

Origin of the reference for the coordinates. Default: upperleft.

out

output format: "data.frame" (default) or "matrix".

Examples

# NOT RUN { ras <- matrix(eco[["P"]][,1],15,15) image(ras) ras.row <- aue.image2df(ras) ras.row image(matrix(ras.row[,3], 15, 15)) # }