bh_find_specimens: Find RawData files

View source: R/old_code/bluehill_functions.2.R View source: R/old_code/bluehill_functions.1.R View source: R/bluehill_functions.R

bh_find_specimensR Documentation

Find RawData files

Description

Starting from study_root, grab the names of everything that looks like an Instron specimen as defined by raw_regex. The default is all RawData files under study_root. If only a sub-set of the sample files are needed, supply a regex to select just those. for example, if there are several samples under study.root and we only want those for "bone", use something like bh_read_specimens(study_root, raw_regex = ".*bone.*RawData.*\.csv") Or better, gather all the file names and filter the returned data.table: bh_read_specimens(study_root)[sample Extracts the sample name is extracted from the name of the folder enclosing the specimen files and the specimen number from the name of each specimen (RawData) file.

Usage

bh_find_specimens(study_root, raw_regex = ".*RawData.*\\.csv")

Arguments

study_root

the path where to start searching for specimen RawData files.

raw_regex

defines what files to read. Defaults to all RawData files.

Value

A list with the full path name to each specimen file (which should be unique) and extracted sample and specimen identifiers.


yadbor/bluer documentation built on Jan. 31, 2023, 7:44 p.m.