Learn R Programming

⚠️There's a newer version (3.0.2) of this package.Take me there.

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

245

Version

3.0.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Nils Reiter

Last Published

January 13th, 2020

Functions in DramaAnalysis (3.0.1)

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