Learn R Programming

DramaAnalysis with R

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

Features

  • 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

Example

# loads a specific, pre-packaged play
data(rksp.0)

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

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

# plot them as a bar plot
barplot(charStat)

Requirements

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

Installation

# installation from CRAN
install.packages("DramaAnalysis")

# 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.

Copy Link

Version

Install

install.packages('DramaAnalysis')

Monthly Downloads

229

Version

3.0.2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

September 18th, 2020

Functions in DramaAnalysis (3.0.2)

loadFields

Dictionary Handling
dictionaryStatistics

Dictionary Use
filterCharacters

Filter characters
loadSet

Load Collections
filterByDictionary

Word frequencies
loadText

Load Text
correlationAnalysis

Correlation analysis
data

Data sets
dramaNames

Format drama titles
barplot.QDCharacterStatistics

Stacked Bar Plot
base_dictionary

Base dictionary
keyness

Keywords
characterNames

Format Names
ensureSuffix

Utility functions
mapPrefix

Replace corpus prefix
characterStatistics

Basic Character Statistics
loadMeta

Load meta data
loadAllInstalledIds

Installed texts
loadDramaTEI

Load drama
installData

Download preprocessed drama data
isolateCharacterSpeech

Isolate Character Speech
newCollection

Create or Extend a Collection
plotSpiderWebs

Spider-Webs
presence

Active and Passive Presence
qd.colors

QuaDramA colors
numberOfPlays

Number of plays
postags

Provides lists of groups of pos tags for various word classes.
personnelExchange

Measuring Personnel Exchange over Boundaries
combine

Combine multiple plays
loadCharacters

Character data loading
configuration

Character Configuration
installCollectionData

Download and install collection data
frequencytable2

Extract bigrams instead of words (currently not taking utterance boundaries into account)
plot.QDHamming

Personnel Exchange
report

Report
plot.QDUtteranceStatistics

Utterance positions
segment

Segment
setCollectionDirectory

This function initializes the paths to data files.
loadDrama

Load drama
split.QDDrama

Split multiple plays
tfidf

TF-IDF
utteranceStatistics

Utterance Statistics