agg_seq: Aggregate Similarity Sequence

View source: R/conversation_sequence_utilities.R

agg_seqR Documentation

Aggregate Similarity Sequence

Description

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

Details

This function aggregates a similarity sequence into a specified number of segments for a single dyad.

Value

A numeric vector of aggregated similarity scores

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)

# Aggregate the sequence into 5 segments
agg_5 <- agg_seq(seq, 5)
print(agg_5)

conversim documentation built on Sept. 20, 2024, 5:09 p.m.