View source: R/compute_jc_mid.R
compute_jc_mid | R Documentation |
This function computes the Euclidean average of two 3D vectors for each row in the data frame, commonly used to find the joint centre (e.g., knee, ankle, etc.).
compute_jc_mid(
data,
marker_name_1,
marker_name_2,
jc_name = "jc",
append = TRUE
)
data |
A data frame containing columns with 3D vectors. |
marker_name_1 |
A string specifying the column name or pattern for the first 3D vector in the data frame. |
marker_name_2 |
A string specifying the column name or pattern for the second 3D vector in the data frame. |
jc_name |
A string specifying the prefix for the average vector (joint centre) column names in the output. |
append |
Logical. If TRUE, appends the computed average vector as new columns to the original data frame. |
A data frame with the computed average vector either appended to the original data frame or as a separate data frame depending on the 'append' argument.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.