characterStatistics {DramaAnalysis}R Documentation

Basic Character Statistics

Description

This function extracts character statistics from a drama object.

Usage

characterStatistics(
  drama,
  normalize = FALSE,
  segment = c("Drama", "Act", "Scene"),
  filterPunctuation = FALSE
)

Arguments

drama

A QDDrama object

normalize

Normalizing the individual columns

segment

"Drama", "Act", or "Scene". Allows calculating statistics on segments of the play

filterPunctuation

Whether to exclude all punctuation from token counts

Value

A data frame with the additional classes QDCharacterStatistics and QDHasCharacter. It has following columns and one row for each character: tokens: The number of tokens spoken by that character types : The number of different tokens (= types) spoken by each character utterances: The number of utterances utteranceLengthMean: The mean length of utterances utteranceLengthSd: The standard deviation in utterance length

See Also

characterNames

Examples

data(rksp.0)
stat <- characterStatistics(rksp.0)

[Package DramaAnalysis version 3.0.2 Index]