DramaAnalysis v3.0.1


Monthly downloads



Analysis of Dramatic Texts

Analysis of preprocessed dramatic texts, with respect to literary research. The package provides functions to analyze and visualize information about characters, stage directions, the dramatic structure and the text itself. The dramatic texts are expected to be in CSV format, which can be installed from within the package, sample texts are provided. The package and the reasoning behind it are described in Reiter et al. (2017) <doi:10.18420/in2017_119>.


CRAN release Build Status DOI license Join the chat at https://gitter.im/quadrama/DramaAnalysis

DramaAnalysis with R

This package contains a number of functions to support the analysis of dramatic texts.


  • Summary statistics about the number of words and utterances per character
  • Statistics about word use from a dictionary per character
  • Support for stylometric analyses by character or text
  • Generation of a report for a dramatic text
  • Reads in preprocessed texts


# loads a specific, pre-packaged play

# calculates standard stats about a character
charStat <- characterStatistics(rksp.0)

# fix character names
charStat <- characterNames(charStat, rksp.0)

# plot them as a bar plot


DramaAnalysis works on Mac OS X, Windows 10 and Linuxes, and requires R 3.3 or later.


# installation from CRAN

# Install newest development version, requires devtools to be installed
devtools::install_github("quadrama/DramaAnalysis", ref="develop/3.x")

Usage and Howto

Please refer to the tutorial.

Functions in DramaAnalysis

Name Description
installData Download preprocessed drama data
configuration Character Configuration
loadSet Load Collections
setCollectionDirectory This function initializes the paths to data files.
loadText Load Text
split.QDDrama Split multiple plays
ensureSuffix Utility functions
isolateCharacterSpeech Isolate Character Speech
dramaNames Format drama titles
mapPrefix Replace corpus prefix
plotSpiderWebs Spider-Webs
newCollection Create or Extend a Collection
postags Provides lists of groups of pos tags for various word classes.
keyness Keywords
report Report
numberOfPlays Number of plays
tfidf TF-IDF
segment Segment
utteranceStatistics Utterance Statistics
personnelExchange Measuring Personnel Exchange over Boundaries
loadAllInstalledIds Installed texts
filterCharacters Filter characters
loadDramaTEI Load drama
filterByDictionary Word frequencies
frequencytable2 Extract bigrams instead of words (currently not taking utterance boundaries into account)
loadMeta Load meta data
presence Active and Passive Presence
loadCharacters Character data loading
qd.colors QuaDramA colors
loadDrama Load drama
installCollectionData Download and install collection data
plot.QDHamming Personnel Exchange
plot.QDUtteranceStatistics Utterance positions
dictionaryStatistics Dictionary Use
loadFields Dictionary Handling
barplot.QDCharacterStatistics Stacked Bar Plot
base_dictionary Base dictionary
correlationAnalysis Correlation analysis
combine Combine multiple plays
data Data sets
characterNames Format Names
characterStatistics Basic Character Statistics
No Results!

Last month downloads


Type Package
Date 2020-01-11
Language en-US
URL https://github.com/quadrama/DramaAnalysis
BugReports https://github.com/quadrama/DramaAnalysis/issues
License GPL (>= 3)
LazyData TRUE
RoxygenNote 7.0.2
Encoding UTF-8
NeedsCompilation no
Packaged 2020-01-11 12:23:26 UTC; reiterns
Repository CRAN
Date/Publication 2020-01-13 09:20:18 UTC

Include our badge in your README