A convenience wrapper around align_scar() that accepts a complete
multi-specimen data frame and handles the grouping internally.
Equivalent to calling group_by(ID) %>% group_modify(~ align_scar(.x)).
Value
The input data frame with nine additional columns:
- s_x, s_y, s_z
Aligned start-point coordinates.
- e_x, e_y, e_z
Aligned end-point coordinates.
- d_x, d_y, d_z
Aligned unit direction vectors.
Details
Specimens are processed independently: the SVD plane and in-plane
rotation are estimated separately for each group defined by id_col.
Row order within each group is preserved; the output is ungrouped.
