Aggregate similarity sequence for a single dyad
Usage
agg_seq(sequence, num_segments)
Arguments
- sequence
A numeric vector of similarity scores for a single dyad
- num_segments
The number of segments to aggregate into
Value
A numeric vector of aggregated similarity scores
Details
This function aggregates a similarity sequence into a specified number of segments for a single dyad.
Examples
seq <- c(0.5, 0.6, 0.7, 0.6, 0.8, 0.7, 0.9, 0.8, 0.7, 0.8)
# Aggregate the sequence into 3 segments
agg_3 <- agg_seq(seq, 3)
print(agg_3)
#> [1] 0.60 0.80 0.75
# Aggregate the sequence into 5 segments
agg_5 <- agg_seq(seq, 5)
print(agg_5)
#> [1] 0.55 0.65 0.75 0.85 0.75