get_wl_metadata {workloopR}R Documentation

Get file info for a sequence of experiment files

Description

Grab metadata from files stored in the same folder (e.g. a sequence of trials in an experiment).

Usage

get_wl_metadata(file_path, pattern = "*.ddf")

Arguments

file_path

Path where files are stored. Should be in the same folder.

pattern

Regex pattern for identifying relevant files in the file_path.

Details

If several files (e.g. successive trials from one experiment) are stored in one folder, use this function to obtain metadata in a list format. Runs file.info() from base R to extract info from files.

This function is not truly considered to be part of the batch analysis pipeline; see read_analyze_wl_dir() for a similar function that not only grabs metadata but also imports & analyzes files. Instead, get_wl_metadata() is meant to be a handy function to investigate metadata issues that arise if running read_analyze_wl_dir() goes awry.

Unlike read_analyze_wl_dir(), this function does not necessarily need files to all be work loops. Any file type is welcome (as long as the Regex pattern argument makes sense).

Value

Either a data.frame (if a single file is supplied) or a list of data.frames (if a list of files is supplied), with information as supplied from file.info().

Author(s)

Vikram B. Baliga

See Also

summarize_wl_trials

Other data import functions: as_muscle_stim(), read_analyze_wl_dir(), read_analyze_wl(), read_ddf_dir(), read_ddf()

Other workloop functions: analyze_workloop(), fix_GR(), invert_position(), read_analyze_wl_dir(), read_analyze_wl(), select_cycles(), summarize_wl_trials(), time_correct()

Other batch analyses: read_analyze_wl_dir(), summarize_wl_trials(), time_correct()

Examples


library(workloopR)

# get file info for files included with workloopR
wl_meta <- get_wl_metadata(system.file("extdata/wl_duration_trials",
                                       package = 'workloopR'))


[Package workloopR version 1.1.4 Index]