adj_position {ChestVolume} | R Documentation |
Adjust Marker Positions Towards Center
Description
Adjusts the positions of markers by moving them towards the average center position within each timeframe by a specified distance. This accounts for marker protrusion from the skin surface.
Usage
adj_position(data, distance = 1)
Arguments
data |
A data frame where each row represents a marker at a specific timeframe, with columns 'Timeframe', 'Marker', 'X', 'Y', 'Z'. |
distance |
Numeric value indicating the distance to adjust towards the center (default is 1 cm). |
Details
The function calculates the average center position of all markers within each timeframe and moves each marker towards the center by the specified distance along the line connecting the marker to the center.
Value
A data frame of the same dimensions as data
, containing the adjusted marker coordinates.
Examples
data("sample_data")
processed_data <- process_marker_data(head(sample_data))
adjusted_data <- adj_position(processed_data, distance = 1)
head(adjusted_data)
[Package ChestVolume version 1.0.0 Index]