time_correct {workloopR}R Documentation

Time correction for work loop experiments

Description

Correct for potential degradation of muscle over time.

Usage

time_correct(x)

Arguments

x

A data.frame with summary data, e.g. an object created by summarize_wl_trials().

Details

This function assumes that across a batch of successive trials, the stimulation parameters for the first and final trials are identical. If not, DO NOT USE. Decline in power output is therefore assumed to be a linear function of time. Accordingly, the difference between the final and first trial's (absolute) power output is used to 'correct' trials that occur in between, with explicit consideration of run order and time elapsed (via mtime). A similar correction procedure is applied to work.

Value

A data.frame that additionally contains:

Time_Corrected_Work

Time corrected work output, transformed from $Mean_Work

Time_Corrected_Power

Time corrected net power output, transformed from $Mean_Power

And new attributes:

power_difference

Difference in mass-specific net power output between the final and first trials.

time_difference

Difference in mtime between the final and first trials.

time_correction_rate

Overall rate; power_difference divided by time_difference.

Author(s)

Vikram B. Baliga and Shreeram Senthivasan

See Also

summarize_wl_trials

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

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

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)

# now summarize
summarized_wls <- summarize_wl_trials(analyzed_wls)


# mtimes within the package are not accurate, so we'll supply
# our own vector of mtimes
summarized_wls$mtime <- read.csv(
                          system.file(
                            "extdata/wl_duration_trials/ddfmtimes.csv",
                            package="workloopR"))$mtime

# now time correct
timecor_wls <- time_correct(summarized_wls)
timecor_wls



[Package workloopR version 1.1.4 Index]