Learn R Programming

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

qdap

qdap (Quantitative Discourse Analysis Package) is an R package designed to assist in quantitative discourse analysis. The package stands as a bridge between qualitative transcripts of dialogue and statistical analysis & visualization.

Installation

To download the development version of qdap:

Download the zip ball or tar ball, decompress and run R CMD INSTALL on it, or use the pacman package to install the development version (The user may want to install the dev version of reports first):

if (!require("pacman")) install.packages("pacman")
pacman::p_load_gh(
    "trinker/qdapDictionaries",
    "trinker/qdapRegex",
    "trinker/qdapTools",
    "trinker/qdap"
)

Help

Contact

You are welcome to:

Note: If you are reporting a bug make sure you have first read the Cleaning Text & Debugging vignette

Copy Link

Version

Install

install.packages('qdap')

Monthly Downloads

1,796

Version

2.3.6

License

GPL-2

Maintainer

Last Published

January 9th, 2020

Functions in qdap (2.3.6)

DATA.SPLIT

Fictitious Split Sentence Classroom Dialogue
DATA

Fictitious Classroom Dialogue
Animate.discourse_map

Discourse Map
Animate.gantt

Gantt Durations
Animate.formality

Animate Formality
Animate.polarity

Animate Polarity
Animate.character

Animate Character
Animate.lexical_classification

Animate Formality
Animate.gantt_plot

Gantt Plot
Animate

Generic Animate Method
Network

Generic Network Method
Network.polarity

Network Polarity
Network.lexical_classification

Network Lexical Classification
Trim

Remove Leading/Trailing White Space
Title

Add Title to Select qdap Plots
capitalizer

Capitalize Select Words
%&%

qdap Chaining
Network.formality

Network Formality
Dissimilarity

Dissimilarity Statistics
DATA2

Fictitious Repeated Measures Classroom Dialogue
as.tdm

tm Package Compatibility Tools: Apply to or Convert to/from Term Document Matrix or Document Term Matrix
adjacency_matrix

Takes a Matrix and Generates an Adjacency Matrix
Filter.all_words

Filter
wfm

Word Frequency Matrix
NAer

Replace Missing Values (NA)
counts.fry

Readability Measures
counts.linsear_write

Readability Measures
cm_long2dummy

Stretch and Dummy Code cm_xxx2long
check_text

Check Text For Potential Problems
beg2char

Grab Begin/End of String to Character
chunker

Break Text Into Ordered Word Chunks
+.Network

Add themes to a Network object.
blank2NA

Replace Blanks in a dataframe
cm_range.temp

Range Code Sheet
cm_code.exclude

Exclude Codes
cm_time2long

Transform Codes to Start-End Times
colcomb2class

Combine Columns to Class
cm_code.overlap

Find Co-occurrence Between Codes
counts.pos_by

Parts of Speech
check_spelling_interactive.check_spelling

Check Spelling
counts.SMOG

Readability Measures
automated_readability_index

Readability Measures
bag_o_words

Bag of Words
check_spelling_interactive.factor

Check Spelling
all_words

Searches Text Column for Words
check_spelling_interactive.character

Check Spelling
clean

Remove Escaped Characters
check_spelling

Check Spelling
cm_df2long

Transform Codes to Start-End Durations
plot.cumulative_lexical_classification

Plots a cumulative_lexical_classification Object
add_s

Make Plural (or Verb to Singular) Versions of Words
Search

Search Columns of a Data Frame
add_incomplete

Detect Incomplete Sentences; Add | Endmark
cm_code.blank

Blank Code Transformation
cm_df.transcript

Transcript With Word Number
counts.coleman_liau

Readability Measures
cm_code.transform

Transform Codes
bracketX

Bracket Parsing
comma_spacer

Ensure Space After Comma
cm_2long

A Generic to Long Function
cm_combine.dummy

Find Co-occurrence Between Dummy Codes
counts.flesch_kincaid

Readability Measures
dir_map

Map Transcript Files from a Directory to a Script
build_qdap_vignette

Replace Temporary Introduction to qdap Vignette
cm_df.fill

Range Coding
plot.cumulative_animated_formality

Plots a cumulative_animated_formality Object
counts.termco

Term Counts
cm_df.temp

Break Transcript Dialogue into Blank Code Matrix
colSplit

Separate a Column Pasted by paste2
counts.pronoun_type

Question Counts
counts.question_type

Question Counts
common

Find Common Words Between Groups
hamlet

Hamlet (Complete & Split by Sentence)
dispersion_plot

Lexical Dispersion Plot
discourse_map

Discourse Mapping
counts.polarity

Polarity
cm_range2long

Transform Codes to Start-End Durations
cm_time.temp

Time Span Code Sheet
colsplit2df

Wrapper for colSplit that Returns Dataframe(s)
condense

Condense Dataframe Columns
gantt_plot

Gantt Plot
common.list

list Method for common
cumulative

Cumulative Scores
counts.subject_pronoun_type

Question Counts
left_just

Text Justification
plot.animated_lexical_classification

Plots an animated_lexical_classification Object
cm_dummy2long

Convert cm_combine.dummy Back to Long
cm_code.combine

Combine Codes
cm_distance

Distance Matrix Between Codes
plot.end_mark_by_count

Plots a end_mark_by_count Object
counts.automated_readability_index

Readability Measures
counts.word_length

Word Length Counts
freq_terms

Find Frequent Terms
counts.character_table

Term Counts
counts

Generic Counts Method
end_inc

Test for Incomplete Sentences
counts.end_mark_by

Question Counts
lexical_classification

Lexical Classification Score
diversity

Diversity Statistics
dist_tab

SPSS Style Frequency Tables
mraja1spl

Romeo and Juliet: Act 1 Dialogue Merged with Demographics and Split
plot.lexical_classification_score

Plots a lexical_classification_score Object
gradient_cloud

Gradient Word Cloud
plot.combo_syllable_sum

Plots a combo_syllable_sum Object
counts.pos

Parts of Speech
counts.object_pronoun_type

Question Counts
print.animated_lexical_classification

Prints an animated_lexical_classification Object
gantt_wrap

Gantt Plot
htruncdf

Dataframe Viewing
plot.end_mark_by_proportion

Plots a end_mark_by_proportion Object
object_pronoun_type

Count Object Pronouns Per Grouping Variable
vertex_apply

Apply Parameter to List of Igraph Vertices/Edges
exclude

Exclude Elements From a Vector
kullback_leibler

Kullback Leibler Statistic
plot.end_mark_by

Plots a end_mark_by Object
formality

Formality Score
print.diversity

Prints a diversity object
multiscale

Nested Standardization
plot.freq_terms

Plots a freq_terms Object
plot.SMOG

Plots a SMOG Object
name2sex

Names to Gender
paste2

Paste an Unspecified Number Of Text Columns
env.syl

Syllable Lookup Environment
plot.rmgantt

Plots a rmgantt object
counts.word_stats

Word Stats
plot.automated_readability_index

Plots a automated_readability_index Object
gantt_rep

Generate Unit Spans for Repeated Measures
mraja1

Romeo and Juliet: Act 1 Dialogue Merged with Demographics
plot.character_table

Plots a character_table Object
counts.formality

Formality
end_mark

Sentence End Marks
counts.word_position

Word Position
plot.animated_character

Plots an animated_character Object
phrase_net

Phrase Nets
plot.pronoun_type

Plots an pronoun_type Object
key_merge

Merge Demographic Information with Person/Text Transcript
plot.coleman_liau

Plots a coleman_liau Object
outlier_detect

Detect Outliers in Text
plot.diversity

Plots a diversity object
plot.linsear_write_scores

Plots a linsear_write_scores Object
plot.pos_preprocessed

Plots a pos_preprocessed Object
plot.Network

Plots a Network Object
plot.cumulative_animated_lexical_classification

Plots a cumulative_animated_lexical_classification Object
inspect_text

Inspect Text Vectors
print.cumulative_animated_formality

Prints a cumulative_animated_formality Object
plot.end_mark

Plots an end_mark Object
plot.syllable_freq

Plots a syllable_freq Object
multigsub

Multiple gsub
plot.end_mark_by_score

Plots a end_mark_by_score Object
mcsv_r

Read/Write Multiple csv Files at a Time
plot.kullback_leibler

Plots a kullback_leibler object
duplicates

Find Duplicated Words in a Text String
plot.cumulative_syllable_freq

Plots a cumulative_syllable_freq Object
plot.word_stats

Plots a word_stats object
plot.cumulative_end_mark

Plots a cumulative_end_mark Object
plot.sum_cmspans

Plot Summary Stats for a Summary of a cmspans Object
plot.pos

Plots a pos Object
is.global

Test If Environment is Global
outlier_labeler

Locate Outliers in Numeric String
plot.cmspans

Plots a cmspans object
plot.word_cor

Plots a word_cor object
plot.sums_gantt

Plots a sums_gantt object
plot.lexical

Plots a lexical Object
plot.end_mark_by_preprocessed

Plots a end_mark_by_preprocessed Object
preprocessed.subject_pronoun_type

Question Counts
plot.linsear_write

Plots a linsear_write Object
plot.animated_discourse_map

Plots an animated_discourse_map Object
gantt

Gantt Durations
plot.animated_polarity

Plots an animated_polarity Object
plot.cm_distance

Plots a cm_distance object
potential_NA

Search for Potential Missing Values
sentiment_frame

Power Score (Sentiment Analysis)
pres_debates2012

2012 U.S. Presidential Debates
plot.word_position

Plots a word_position object
qtheme

Add themes to a Network object.
plot.polarity

Plots a polarity Object
print.formality_scores

Prints a formality_scores object
plot.cumulative_formality

Plots a cumulative_formality Object
preprocessed.pronoun_type

Question Counts
print.cumulative_syllable_freq

Prints a cumulative_syllable_freqObject
imperative

Intuitively Remark Sentences as Imperative
plot.gantt

Plots a gantt object
plot.pos_by

Plots a pos_by Object
plot.lexical_classification

Plots a lexical_classification Object
plot.linsear_write_count

Plots a linsear_write_count Object
ngrams

Generate ngrams
incomplete_replace

Denote Incomplete End Marks With "|"
preprocessed.question_type

Question Counts
print.animated_character

Prints an animated_character Object
plot.word_length

Plots a word_length Object
plot.lexical_classification_preprocessed

Plots a lexical_classification_preprocessed Object
plot.discourse_map

Plots a discourse_map Object
plot.table_count

Plots a table_count Object
pos

Parts of Speech Tagging
preprocessed.check_spelling_interactive

Check Spelling
print.end_mark

Prints an end_mark object
preprocessed

Generic Preprocessed Method
preprocessed.word_position

Word Position
plot.subject_pronoun_type

Plots an subject_pronoun_type Object
plot.table_proportion

Plots a table_proportion Object
replace_abbreviation

Replace Abbreviations
polarity

Polarity Score (Sentiment Analysis)
proportions.end_mark_by

Question Counts
preprocessed.pos

Parts of Speech
print.discourse_map

Prints a discourse_map Object
print.animated_polarity

Prints an animated_polarity Object
print.cm_distance

Prints a cm_distance Object
print.subject_pronoun_type

Prints a subject_pronoun_type object
print.all_words

Prints an all_words Object
print.coleman_liau

Prints an coleman_liau Object
print.fry

Prints an fry Object
print.wfm_summary

Prints a wfm_summary Object
proportions.subject_pronoun_type

Question Counts
print.end_mark_by

Prints an end_mark_by object
print.readability_count

Prints a readability_count Object
print.sum_cmspans

Prints a sum_cmspans object
print.readability_score

Prints a readability_score Object
print.phrase_net

Prints a phrase_net Object
print.object_pronoun_type

Prints a object_pronoun_type object
proportions.formality

Formality
plot.wfdf

Plots a wfdf object
print.wfm

Prints a wfm Object
strip

Strip Text
print.automated_readability_index

Prints an automated_readability_index Object
plot.readability_count

Plots a readability_count Object
plot.readability_score

Plots a readability_score Object
print.word_cor

Prints a word_cor object
print.cumulative_animated_lexical_classification

Prints a cumulative_animated_lexical_classification Object
print.boolean_qdap

Prints a boolean_qdap object
proportions.question_type

Question Counts
new_project

Project Template
plot.type_token_ratio

Plots a type_token_ratio Object
sample.time.span

Minimal Time Span Data Set
preprocessed.formality

Formality
print.termco

Prints a termco object.
preprocessed.end_mark_by

Question Counts
print.check_spelling_interactive

Prints a check_spelling_interactive Object
print.check_text

Prints a check_text Object
plot.cumulative_animated_polarity

Plots a cumulative_animated_polarity Object
plot.object_pronoun_type

Plots an object_pronoun_type Object
pres_debate_raw2012

First 2012 U.S. Presidential Debate
plot.wfm

Plots a wfm object
proportions.object_pronoun_type

Question Counts
print.cumulative_combo_syllable_sum

Prints a cumulative_combo_syllable_sum Object
scores.character_table

Term Counts
plot.sent_split

Plots a sent_split Object
plot.animated_formality

Plots a animated_formality Object
plot.flesch_kincaid

Plots a flesch_kincaid Object
preprocessed.pos_by

Parts of Speech
plot.word_stats_counts

Plots a word_stats_counts Object
print.polarity_count

Prints a polarity_count Object
print.character_table

Prints a character_table object
proportions.word_length

Word Length Counts
print.inspect_text

Prints an inspect_text Object
strWrap

Wrap Character Strings to Format Paragraphs
print.cumulative_animated_polarity

Prints a cumulative_animated_polarity Object
plot.question_type

Plots a question_type Object
plot.polarity_count

Plots a polarity_count Object
plot.formality_scores

Plots a formality_scores Object
plot.cumulative_combo_syllable_sum

Plots a cumulative_combo_syllable_sum Object
preprocessed.lexical_classification

Lexical Classification
plot.cumulative_polarity

Plots a cumulative_polarity Object
plot.formality

Plots a formality Object
plot.table_score

Plots a table_score Object
print.kullback_leibler

Prints a kullback_leibler Object.
print.linsear_write

Prints an linsear_write Object
print.polarity_score

Prints a polarity_score Object
proportions.termco

Term Counts
question_type

Count of Question Type
trans_context

Print Context Around Indices
read.transcript

Read Transcripts Into R
trans_venn

Venn Diagram by Grouping Variable
raw.time.span

Minimal Raw Time Span Data Set
plot.polarity_score

Plots a polarity_score Object
print.polarity

Prints an polarity Object
print.pos_preprocessed

Prints a pos_preprocessed object
print.end_mark_by_preprocessed

Prints a end_mark_by_preprocessed object
print.polysyllable_sum

Prints an polysyllable_sum object
print.pronoun_type

Prints a pronoun_type object
print.trunc

Prints a trunc object
print.animated_discourse_map

Prints an animated_discourse_map Object
plot.weighted_wfm

Plots a weighted_wfm object
preprocessed.object_pronoun_type

Question Counts
print.Network

Prints a Network Object
print.lexical_classification_score

Prints a lexical_classification_score Object
print.Dissimilarity

Prints a Dissimilarity object
plot.question_type_preprocessed

Plots a question_type_preprocessed Object
plot.word_proximity

Plots a word_proximity object
print.lexical_classification_preprocessed

Prints a lexical_classification_preprocessed Object
print.linsear_write_count

Prints a linsear_write_count Object
plot.termco

Plots a termco object
print.flesch_kincaid

Prints an flesch_kincaid Object
print.animated_formality

Prints a animated_formality Object
print.table_score

Prints a table_score object
raj.act.5

Romeo and Juliet: Act 5
print.cumulative_end_mark

Prints a cumulative_end_mark Object
print.SMOG

Prints an SMOG Object
print.lexical_classification

Prints an lexical_classification Object
print.check_spelling

Prints a check_spelling Object
print.type_token_ratio

Prints a type_token_ratio Object
proportions.character_table

Term Counts
print.adjacency_matrix

Prints an adjacency_matrix Object
print.cumulative_lexical_classification

Prints a cumulative_lexical_classification Object
print.sent_split

Prints a sent_split object
scores.fry

Readability Measures
print.combo_syllable_sum

Prints an combo_syllable_sum object
scores.formality

Formality
print.colsplit2df

Prints a colsplit2df Object.
scores

Generic Scores Method
scrubber

Clean Imported Text
sentSplit

Sentence Splitting
print.word_length

Prints a word_length object
print.question_type

Prints a question_type object
print.cumulative_formality

Prints a cumulative_formality Object
synonyms

Search For Synonyms
proportions.pronoun_type

Question Counts
print.table_count

Prints a table_count object
print.formality

Prints a formality Object
raj.act.4

Romeo and Juliet: Act 4
print.word_list

Prints a word_list Object
qdap_df

Create qdap Specific Data Structure
print.pos

Prints a pos Object.
raj.act.3

Romeo and Juliet: Act 3
prop

Convert Raw Numeric Matrix or Data Frame to Proportions
print.question_type_preprocessed

Prints a question_type_preprocessed object
visual.discourse_map

Discourse Map
word_list

Raw Word Lists/Frequency Counts
scores.SMOG

Readability Measures
word_network_plot

Word Network Plot
visual

Generic visual Method
raj.act.1POS

print.word_proximity

Prints a word_proximity object
proportions.word_position

Word Position
scores.linsear_write

Readability Measures
replace_number

Replace Numbers With Text Representation
qheat

Quick Heatmap
print.sub_holder

Prints a sub_holder object
print.word_stats

Prints a word_stats object
proportions

Generic Proportions Method
scores.pronoun_type

Question Counts
scores.polarity

Polarity
print.pos_by

Prints a pos_by Object.
raj.act.2

Romeo and Juliet: Act 2
summary.wfdf

Summarize a wfdf object
scores.automated_readability_index

Readability Measures
replace_contraction

Replace Contractions
tot_plot

Visualize Word Length by Turn of Talk
print.qdapProj

Prints a qdapProj Object
print.qdap_context

Prints a qdap_context object
print.table_proportion

Prints a table_proportion object
print.cumulative_polarity

Prints a cumulative_polarity Object
print.ngrams

Prints an ngrams object
print.lexical_classification_by

Prints a lexical_classification Object
pronoun_type

Count Object/Subject Pronouns Per Grouping Variable
print.word_stats_counts

Prints a word_stats_counts object
print.linsear_write_scores

Prints a linsear_write_scores Object
scores.coleman_liau

Readability Measures
random_sent

Generate Random Dialogue Data
proportions.pos

Parts of Speech
raj.demographics

Romeo and Juliet Demographics
scores.lexical_classification

Lexical Classification
scores.subject_pronoun_type

Question Counts
print.syllable_sum

Prints an syllable_sum object
qprep

Quick Preparation of Text
replace_ordinal

Replace Mixed Ordinal Numbers With Text Representation
scores.question_type

Question Counts
space_fill

Replace Spaces
rm_row

Remove Rows That Contain Markers
print.sums_gantt

Prints a sums_gantt object
scores.pos_by

Parts of Speech
proportions.pos_by

Parts of Speech
type_token_ratio

Type-Token Ratio
print.word_position

Prints a word_position object.
qdap

qdap: Quantitative Discourse Analysis Package
rajPOS

Romeo and Juliet Split in Parts of Speech
syllable_sum

Syllabication
summary.wfm

Summarize a wfm object
word_diff_list

Differences In Word Use Between Groups
print.which_misspelled

Prints a which_misspelled Object
print.word_associate

Prints a word_associate object
qcombine

Combine Columns
replacer

Replace Cells in a Matrix or Data Frame
replace_symbol

Replace Symbols With Word Equivalents
rank_freq_mplot

Rank Frequency Plot
qcv

Quick Character Vector
raj.act.1

Romeo and Juliet: Act 1
raj

Romeo and Juliet (Unchanged & Complete)
word_length

Count of Word Lengths Type
scores.termco

Term Counts
scores.object_pronoun_type

Question Counts
scores.word_length

Word Length Counts
t.DocumentTermMatrix

Transposes a DocumentTermMatrix object
subject_pronoun_type

Count Subject Pronouns Per Grouping Variable
word_cor

Find Correlated Words
scores.word_position

Word Position
scores.end_mark_by

Question Counts
summary.cmspans

Summarize a cmspans object
word_proximity

Proximity Matrix Between Words
rajSPLIT

Romeo and Juliet (Complete & Split)
t.TermDocumentMatrix

Transposes a TermDocumentMatrix object
speakerSplit

Break and Stretch if Multiple Persons per Cell
word_count

Word Counts
rm_stopwords

Remove Stop Words
word_stats

Descriptive Word Statistics
termco

Search For and Count Terms
scores.flesch_kincaid

Readability Measures
spaste

Add Leading/Trailing Spaces
trans_cloud

Word Clouds by Grouping Variable
word_associate

Find Associated Words
weight

Weight a qdap Object
scores.word_stats

Word Stats
word_position

Word Position
unique_by

Find Unique Words by Grouping Variable
termco_c

Combine Columns from a termco Object
stemmer

Stem Text