DramaAnalysis (version 3.0.1)

characterStatistics: 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

Run this code
# NOT RUN {
data(rksp.0)
stat <- characterStatistics(rksp.0)
# }

Run the code above in your browser using DataCamp Workspace