aue.image2df: Transforming a raster into a data frame with cartesian...

Description Usage Arguments Author(s) Examples

View source: R/auxiliar.R

Description

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

Usage

1
2
3
4
5
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".

Author(s)

Leandro Roser learoser@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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))


## End(Not run)

EcoGenetics documentation built on July 8, 2020, 5:46 p.m.