pp2array: pp2array

View source: R/pp2array.R

pp2arrayR Documentation

pp2array

Description

This function inputs *pp files into an array of dimensions p, k, n

Usage

pp2array(dir = NULL, ID = NULL, string_del = NULL, save.txt = FALSE)

Arguments

dir

Optional argument. Directory where the *.pp files are. Default (NULL) is the current working directory.

ID

Optional argument for specimens IDs. The default (NULL) is the file names.

string_del

Optional argument. Indicates pattern in the specimens names to be deleted. Use only if ID = NULL.

save.txt

Optional argument. Indicates whether to also save *.txt files with the landmark coordinates.

Value

This function returns an array of dimensions (p, k, n), in which p is the number of landmarks, k = 3 (number of dimensions), and n is the number of specimens.

Author(s)

Marta Vidal-Garcia

Examples

# array <- pp2array()
# If we have other *.pp files in another directory and with the suffix "skull"
# For example: "spec1_skull.pp", "spec2_skull.pp", "spec3_skull.pp", etc.
# dir <- "~/Documents/skull_LMs")
# skull_array <- pp2array(dir = skull_dir, string_del="_skull", save.tag = TRUE) # will save *.tag landmark files


marta-vidalgarcia/morpho.tools.GM documentation built on April 7, 2023, 12:54 a.m.