If filenames are consistently named with the same character serating factors, and with every individual including its belonging levels, e.g.:
001_speciesI_siteA_ind1_dorsalview
002_speciesI_siteA_ind2_lateralview
etc., this function returns a data.frame from it that can be passed to Out, Opn, Ldk objects.
lf_structure(lf, names = character(), split = "_", trim.extension = FALSE)
data.frame with, for every individual, the corresponding level for every group.
a list (its names are used, except if it is a list from import_tps
in this case names(lf$coo)
is used) of a list of filenames, as characters, typically such as
those obtained with list.files. Alternatively, a path to a folder
containing the files. Actually, if lf is of length 1 (a single character),
the function assumes it is a path and do a list.files on it.
the names of the groups, as a vector of characters which length corresponds to the number of groups.
character, the spliting factor used for the file names.
logical. Whether to remove the last for characters in filenames, typically their extension, e.g. '.jpg'.
The number of groups must be consistent across filenames.
import_jpg1, import_Conte, import_txt, lf_structure. See also Momocs' vignettes for data import.
Other babel functions:
tie_jpg_txt()