View source: R/batch_analysis_functions.R
| get_wl_metadata | R Documentation |
Grab metadata from files stored in the same folder (e.g. a sequence of trials in an experiment).
get_wl_metadata(file_path, pattern = "*.ddf")
file_path |
Path where files are stored. Should be in the same folder. |
pattern |
Regex pattern for identifying relevant files in the file_path. |
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).
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().
Vikram B. Baliga
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()
library(workloopR)
# get file info for files included with workloopR
wl_meta <- get_wl_metadata(system.file("extdata/wl_duration_trials",
package = 'workloopR'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.