spatiallong {recexcavAAR} | R Documentation |
Transformation of numeric matrices from wide to long format
Description
spatiallong
transforms a set of two independent variables in vectors and a
dependent variable in a wide matrix to a long matrix that combines the information.
The result is exported as a data.frame.
Usage
spatiallong(x, y, z)
Arguments
x |
vector of first independent variable. e.g. vector with x axis spatial points |
y |
vector of second independent variable. e.g. vector with y axis spatial points |
z |
matrix of dependent variable. e.g. matrix with z axis spatial points |
Value
data.frame with three columns x, y and z
See Also
Other transfuncs: spatialwide
Examples
x <- c(1, 1, 1, 2, 2, 2, 3, 3, 4)
y <- c(1, 2, 3, 1, 2, 3, 1, 2, 3)
z <- c(3, 4, 2, 3, NA, 5, 6, 3, 1)
sw <- spatialwide(x, y, z, digits = 3)
spatiallong(sw$x, sw$y, sw$z)
[Package recexcavAAR version 0.3.0 Index]