assign_tseg_internal: Internal function that adds segment numbers to observations

Description Usage Arguments Value

View source: R/segmentation_helper_functions.R


After breakpoints have been extracted for each animal ID, this function assigns the associated segment number to observations for each animal ID. These segments of observations will be used in the second stage of the model framework to perform mixed-membership clustering by Latent Dirichlet Allocation.


assign_tseg_internal(dat, brkpts)



A data frame that contains all data associated for a given animal ID. Must include a column labeled time1 that numbers each of the observations in consecutive order, which is automatically generated by filter_time.


A data frame of breakpoints for each animal ID (as generated by get_breakpts).


A data frame that updates the original data object by including the segment number associated with each observation in relation to the extracted breakpoints.

bayesmove documentation built on Oct. 22, 2021, 9:08 a.m.