compute_strain: Compute Muscle-Tendon Unit (MTU) Strain

View source: R/compute_strain.R

compute_strainR Documentation

Compute Muscle-Tendon Unit (MTU) Strain

Description

Computes strain (as a decimal) from dynamic and reference muscle length data using:

strain = (dynamic length - reference length) / reference length

Usage

compute_strain(
  length_df_dynamic,
  length_df_reference,
  file_output = "muscle_strain.sto",
  write_file = TRUE,
  return_object = FALSE
)

Arguments

length_df_dynamic

A data frame containing dynamic muscle length data. May include a "time" column.

length_df_reference

A single-row data frame containing reference muscle lengths. May or may not include a "time" column.

file_output

Character string specifying the output filename for the strain .sto file.

write_file

Logical. If TRUE, writes the strain output to a .sto file using biomechanics package.

return_object

Logical. If TRUE, returns the computed strain data frame.

Value

Either a data frame (if return_object = TRUE), or invisibly returns NULL.


Kneerav/biomechanics documentation built on July 16, 2025, 4:51 p.m.