get_lengths.RdThis function calculates the number of columns (lengths) in the jump matrix
for each chain within the outputs object and compiles the results into a data frame.
It also creates a sorted frequency table of the unique lengths in descending order.
get_lengths(outputs, n_chain)A named vector representing the sorted frequency table of column lengths across all chains.
The function iterates through each chain in the range 1:n_chain. For each chain,
it calculates the number of columns in each jump matrix stored in outputs$jump.
These lengths are compiled into a data frame with two columns:
chain: The chain index.
length_n: The number of columns in the jump matrix for that chain.
Finally, it creates a frequency table of the length_n values and sorts it
in descending order, allowing the user to see the most common lengths of jump matrices.