xyz2dataframe: Convert a surface in xyz to a data frame.
Description
Several functions (for example KernSmooth::bkde2D())
return a surface as a list "xyz" composed of three elements:
vector of ordinates in the x dimension,
vector of ordinates in the y dimension and
a matrix with the values of the surface in x and y.
This function transforms a list "xyz" into a data frame.
Usage
xyz2dataframe(xyz, xcol = 1, ycol = 2, zcol = 3)
Value
A data.frame.
Arguments
xyz
a list with 3 elements: a vector with x-coordinates,
a vector with y-coordinates and
and matrix with value for each point of coordinates x[i], y[j].