spatiallong: Transformation of numeric matrices from wide to long format

Description Usage Arguments Value See Also Examples

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

1
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

1
2
3
4
5
6
7
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)

recexcavAAR documentation built on May 1, 2019, 6:48 p.m.