lmk_imp: Import various landmark files for different specimens at once

View source: R/morpho.R

lmk_impR Documentation

Import various landmark files for different specimens at once

Description

Import more than one csv file with landmark points and return an array object with dimensions p x k x n, being p the number of landmarks, k the dimension of the coordinates (2D or 3D), and n the number of specimens (the number of files, as each file contains the landmarks for one specimen).

Usage

lmk_imp(path = NULL, lmk.names = FALSE)

Arguments

path

Character, absolute path to the directory with the csv files with the landmark points are.

lmk.names

Logical, TRUE if there is an extra column for landmark names, FALSE otherwise (see details).

Details

Note that all files need to be comma separated files (csv).

If lmk.names = TRUE, the format expected for 3D landmarks is the following:

landmarks x y z
lmk_1 0.143 -0.028 -0.030
lmk_2 0.128 -0.024 -0.035
... ... ...

Otherwise, if lmk.names = TRUE, then the format is:

x y z
0.143 -0.028 -0.030
0.128 -0.024 -0.035
... ... ...

Note that you can always have 2D landmarks, so the format is the same but the column with the z landmarks will not appear in the files.

Author(s)

Sandra Alvarez-Carretero


dosreislab/mcmc3r documentation built on Feb. 13, 2024, 12:44 a.m.