View source: R/analysis_functions.R
time_correct | R Documentation |
Correct for potential degradation of muscle over time.
time_correct(x)
x |
A |
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.
A data.frame
that additionally contains:
Time_Corrected_Work |
Time corrected work output, transformed from
|
Time_Corrected_Power |
Time corrected net power output, transformed
from |
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; |
Vikram B. Baliga and Shreeram Senthivasan
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()
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.