Makes A list of terms and applies unpack_slope_term() to each of them. Then builds the code for this segment's slope
unpack_slope(form, i, ttype, last_slope)
A "one-row" list with code (char) and a tibble of slopes.
A formula
Segment number (integer)
The term type. One of "ct" (central tendency), "sigma" (variance), or "ar" (autoregressive)
The element in the slope column for this ttype in the previous segment. I.e., probably what this function returned last time it was called!
Jonas Kristoffer Lindeløv jonas@lindeloev.dk