fcsv2array: fcsv2array

View source: R/fcsv2array.R

fcsv2arrayR Documentation

fcsv2array

Description

This function inputs *fcsv files (3DSlicer) into an array of dimensions p, k, n

Usage

fcsv2array(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.

pattern

Optional argument for specific files with a pattern. E.g. "_semilandmarks.fcsv". The default (NULL) is all the ".fcsv" files in a 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 <- fcsv2array()
# If we have other *.fcsv files in another directory and with the suffix "skull"
# For example: "spec1_skull.fcsv", "spec2_skull.fcsv", "spec3_skull.fcsv", etc.
# dir <- "~/Documents/LMs")
# skull_array <- fcsv2array(dir = dir, pattern="_skull", string_del="_skull")
  

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