vecx | R Documentation |
converts a 3D-array (e.g. containing landmark coordinates) into a matrix, one row per specimen or reverse this.
vecx(x, byrow = FALSE, revert = FALSE, lmdim)
x |
array or matrix |
byrow |
logical: if TRUE, the resulting vector for each specimen will
be |
revert |
revert the process and convert a matrix with vectorized landmarks back into an array. |
lmdim |
number of columns for reverting |
returns a matrix with one row per specimen
Stefan Schlager
if (require(shapes)) {
data <- vecx(gorf.dat)
#revert the procedure
gdat.restored <- vecx(data,revert=TRUE,lmdim=2)
range(gdat.restored-gorf.dat)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.