Learn R Programming

conversim (version 0.1.0)

preprocess_dyads: Preprocess multiple dyad conversations

Description

This function preprocesses conversations from multiple dyads by applying text cleaning to each utterance.

Usage

preprocess_dyads(conversations)

Value

A data frame with an additional 'processed_text' column, removing any rows with empty processed text

Arguments

conversations

A data frame with columns 'dyad_id', 'speaker', and 'text'

Examples

Run this code
convs <- data.frame(
  dyad_id = c(1, 1, 2, 2),
  speaker = c("A", "B", "C", "D"),
  text = c("Hello!", "Hi there!", "How are you?", "I'm fine, thanks!")
)
preprocess_dyads(convs)

Run the code above in your browser using DataLab