read_mps: read_mps

read_mpsR Documentation

read_mps

Description

Imports *.mps files into an array of 3D landmarks.

Usage

read_mps(dir = NULL, ID = NULL, save.txt = FALSE)

Arguments

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.

Details

Takes multiple mps files and batch-imports them as a landmark. It can also save the landmarks for each specimen as txt files.

Author(s)

Marta Vidal-Garcia

Examples


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)


marta-vidalgarcia/mesh_process documentation built on May 7, 2022, 12:08 a.m.