drishti2array: drishti2array

View source: R/drishti2array.R

drishti2arrayR Documentation

drishti2array

Description

This function inputs landmark files from Drishti (text file with row #1 containing number of landmarks) into an array of dimensions p, k, n If the files do not have a pattern, (e.g. *.txt) they need to be the only files in that directory

Usage

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

Arguments

dir

Optional argument. Directory where the Drishti landmark 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 <- drishti2array()
# If we have files with the suffix "_skull"
# For example: "spec1_skull", "spec2_skull", "spec3_skull", etc.
# Make sure that the files
# dir <- "~/Documents/skull_LMs")
# skull_array <- drishti2array(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.