Snap raw testicular volume readings to the nearest Prader bead curve
Source:R/plot-stadia.R
snap_tv_to_nearest_bead.RdInternal helper used by plot_stadia_data to trace a tv
trajectory along the single nearest reference curve, since tv is
recorded as a raw ml reading rather than one of the 12 Prader bead
volumes. Unlike calculate_sds's tv handling (which
interpolates continuously between the two surrounding beads), this
snaps to whichever bead is closest, since a trajectory line can only
follow one reference curve at a time.
Arguments
- ml
Vector of raw testicular volume readings, in ml.
- refy_colnames
Column names of the tv reference curves (e.g.
"T1","T2", ...,"T25"), i.e.colnames(ref$tv[, -1])(seenl1997_lines), with the leading"age"column already dropped.