read_mps | R Documentation |
Imports *.mps files into an array of 3D landmarks.
read_mps(dir = NULL, ID = NULL, save.txt = FALSE)
dir |
optional variable that selects which directory the mps files should be imported from. The default is the current directory |
ID |
optional vector with IDs for each landmark matrix from the mps files |
save.txt |
optional. It saves each of the 3D landmark matrices as txt files, without row or column names. |
Takes multiple mps files and batch-imports them as a landmark. It can also save the landmarks for each specimen as txt files.
Marta Vidal-Garcia
dir(pattern = "*.mps") # three mps files with five 3D landmarks each land_array <- read_mps(dir = "./data") # Remove "skull" from the ID name, so that the IDs are "spec1", "spec2", and "spec3". land_array_2 <- read_mps(dir = "./data", save.txt = TRUE) # Assign IDs for each landmark matrix. ID_land <- c("specimen1", "specimen2", "specimen3") land_array_3 <- read_mps(dir = "./data", ID = ID_land)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.