read_analyze_wl_dir {workloopR} | R Documentation |
Read and analyze work loop files from a directory
Description
All-in-one function to import multiple workloop .ddf files from a directory, sort them by mtime, analyze them, and store the resulting objects in an ordered list.
Usage
read_analyze_wl_dir(file_path, pattern = "*.ddf", sort_by = "mtime", ...)
Arguments
file_path |
Directory in which files are located |
pattern |
Regular expression used to specify files of interest. Defaults to all .ddf files within file_path |
sort_by |
Metadata by which files should be sorted to be in the correct
run order. Defaults to |
... |
Additional arguments to be passed to |
Details
Work loop data files will be imported and then arranged in the order
in which they were run (assuming run order is reflected in mtime
).
Chiefly used in conjunction with summarize_wl_trials()
and
time_correct()
if time correction is desired.
Value
A list containing analyzed_workloop
objects, one for each file that is
imported and subsequently analyzed. The list is sorted according to the
sort_by
parameter, which by default uses the time of last modification
of each file's contents (mtime).
Warning
Most systems we have encountered record Position data in millimeters
and Force in millinewtons, and therefore this function assumes data are
recorded in those units. Through a series of internal conversions, this
function computes velocity in meters/sec, work in Joules, and power in
Watts. If your raw data do not originate in millimeters and millinewtons,
please transform your data accordingly and ignore what you see in the
attribute units
.
Author(s)
Shreeram Senthivasan
References
Josephson RK. 1985. Mechanical Power output from Striated Muscle during Cyclic Contraction. Journal of Experimental Biology 114: 493-512.
See Also
read_analyze_wl
,
get_wl_metadata
,
summarize_wl_trials
,
time_correct
Other data analyses:
analyze_workloop()
,
isometric_timing()
,
read_analyze_wl()
Other data import functions:
as_muscle_stim()
,
get_wl_metadata()
,
read_analyze_wl()
,
read_ddf_dir()
,
read_ddf()
Other workloop functions:
analyze_workloop()
,
fix_GR()
,
get_wl_metadata()
,
invert_position()
,
read_analyze_wl()
,
select_cycles()
,
summarize_wl_trials()
,
time_correct()
Other batch analyses:
get_wl_metadata()
,
summarize_wl_trials()
,
time_correct()
Examples
library(workloopR)
# batch read and analyze files included with workloopR
analyzed_wls <- read_analyze_wl_dir(system.file("extdata/wl_duration_trials",
package = 'workloopR'),
phase_from_peak = TRUE,
cycle_def = "p2p", keep_cycles = 2:4)