tag2array: tag2array

View source: R/tag2array.R

tag2arrayR Documentation

tag2array

Description

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

Usage

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

Arguments

dir

Optional argument. Directory where the *.ascii 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.

propagated

Optional argument indicating if the landmarks have been propagated (extra line). The default is FALSE.

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 <- tag2array()
# If we have other *.tag files in another directory and with the suffix "skull"
# For example: "spec1_skull.tag", "spec2_skull.tag", "spec3_skull.tag", etc.
# dir <- "~/Documents/skull_LMs")
# skull_array <- tag2array(dir = skull_dir, string_del="skull")


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