R/LDA_helper_functions.R
summarize_tsegs.Rd
Prepares the data that has already been segmented for clustering by Latent Dirichlet Allocation. This function summarizes the counts observed per movement variable bin within each track segment per animal ID.
summarize_tsegs(dat, nbins)
A data frame of only the animal ID, track segment number,
and the discretized data for each movement variable. Animal ID and time
segment must be the first two columns of this data frame. This should be a
simplified form of the output from assign_tseg
.
numeric. A vector of the number of bins used to discretize each
movement variable. These must be in the same order as the columns within
dat
.
A new data frame that contains the animal ID, track segment number,
and the counts per bin for each movement variable. The names for each of
these bins are labeled according to the order in which the variables were
provided to summarize_tsegs
.