Description Usage Arguments Value Author(s) See Also Examples
Converts a landmark matrix to a landmark list.
1 | landmarkMatrixToList(lm.matrix, semilandmark.pattern='[0-9]+$', k=ncol(lm.matrix))
|
lm.matrix |
a landmark matrix. See |
semilandmark.pattern |
a regular expression pattern passed to |
k |
the number of dimensions of the landmark data. |
a landmark list.
Aaron Olsen
landmarkListToMatrix
, readLandmarksToList
, readLandmarksToMatrix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## GET FILE DIRECTORY FOR PACKAGE FILES
fdir <- paste0(path.package("StereoMorph"), "/extdata/")
## SET FILES TO LOAD - TWO DIFFERENT 3D POINT SETS
file <- paste0(fdir, "lm_2d_a1_v", 1:2, ".txt")
## READ LANDMARKS INTO A LIST
lm.matrix <- readLandmarksToMatrix(file=file, row.names=1)
## CONVERT LANDMARK LIST TO LANDMARK MATRIX
lm.list <- landmarkMatrixToList(lm.matrix, k=2)
## CAN BE CONVERTED BACK INTO MATRIX
## RECOVERING THE SAME MATRIX AS THE ORIGINAL
lm.matrix <- landmarkListToMatrix(lm.list)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.