Learn R Programming

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

License

GPL-2

Maintainer

Last Published

May 11th, 2023

Functions in qdap (2.4.6)

Animate.discourse_map

Discourse Map
Animate

Generic Animate Method
Animate.polarity

Animate Polarity
Animate.formality

Animate Formality
DATA.SPLIT

Fictitious Split Sentence Classroom Dialogue
Animate.character

Animate Character
Animate.lexical_classification

Animate Formality
Animate.gantt_plot

Gantt Plot
Animate.gantt

Gantt Durations
DATA

Fictitious Classroom Dialogue
Network

Generic Network Method
Search

Search Columns of a Data Frame
Filter.all_words

Filter
automated_readability_index

Readability Measures
Network.formality

Network Formality
Network.polarity

Network Polarity
Dissimilarity

Dissimilarity Statistics
Network.lexical_classification

Network Lexical Classification
DATA2

Fictitious Repeated Measures Classroom Dialogue
NAer

Replace Missing Values (NA)
adjacency_matrix

Takes a Matrix and Generates an Adjacency Matrix
Title

Add Title to Select qdap Plots
Trim

Remove Leading/Trailing White Space
bag_o_words

Bag of Words
as.tdm

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

Word Frequency Matrix
+.Network

Add themes to a Network object.
all_words

Searches Text Column for Words
build_qdap_vignette

Replace Temporary Introduction to qdap Vignette
bracketX

Bracket Parsing
add_s

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

Detect Incomplete Sentences; Add | Endmark
capitalizer

Capitalize Select Words
%&%

qdap Chaining
blank2NA

Replace Blanks in a dataframe
beg2char

Grab Begin/End of String to Character
check_spelling_interactive.check_spelling

Check Spelling
check_spelling

Check Spelling
clean

Remove Escaped Characters
check_spelling_interactive.character

Check Spelling
check_spelling_interactive.factor

Check Spelling
check_text

Check Text For Potential Problems
cm_code.transform

Transform Codes
cm_combine.dummy

Find Co-occurrence Between Dummy Codes
chunker

Break Text Into Ordered Word Chunks
cm_range.temp

Range Code Sheet
cm_range2long

Transform Codes to Start-End Durations
cm_code.blank

Blank Code Transformation
cm_code.combine

Combine Codes
cm_time.temp

Time Span Code Sheet
cm_long2dummy

Stretch and Dummy Code cm_xxx2long
common.list

list Method for common
counts

Generic Counts Method
counts.SMOG

Readability Measures
cm_df2long

Transform Codes to Start-End Durations
cm_df.temp

Break Transcript Dialogue into Blank Code Matrix
cm_dummy2long

Convert cm_combine.dummy Back to Long
cm_df.fill

Range Coding
cm_df.transcript

Transcript With Word Number
condense

Condense Dataframe Columns
cm_code.overlap

Find Co-occurrence Between Codes
cm_code.exclude

Exclude Codes
cm_2long

A Generic to Long Function
colcomb2class

Combine Columns to Class
counts.automated_readability_index

Readability Measures
colsplit2df

Wrapper for colSplit that Returns Dataframe(s)
cm_distance

Distance Matrix Between Codes
counts.flesch_kincaid

Readability Measures
counts.formality

Formality
counts.character_table

Term Counts
counts.word_length

Word Length Counts
counts.coleman_liau

Readability Measures
common

Find Common Words Between Groups
comma_spacer

Ensure Space After Comma
counts.end_mark_by

Question Counts
dir_map

Map Transcript Files from a Directory to a Script
htruncdf

Dataframe Viewing
counts.pronoun_type

Question Counts
counts.question_type

Question Counts
env.syl

Syllable Lookup Environment
counts.word_position

Word Position
end_mark

Sentence End Marks
cm_time2long

Transform Codes to Start-End Times
counts.linsear_write

Readability Measures
counts.fry

Readability Measures
counts.pos_by

Parts of Speech
counts.pos

Parts of Speech
colSplit

Separate a Column Pasted by paste2
duplicates

Find Duplicated Words in a Text String
end_inc

Test for Incomplete Sentences
counts.subject_pronoun_type

Question Counts
formality

Formality Score
discourse_map

Discourse Mapping
freq_terms

Find Frequent Terms
counts.termco

Term Counts
gantt_wrap

Gantt Plot
gantt_rep

Generate Unit Spans for Repeated Measures
gantt_plot

Gantt Plot
dispersion_plot

Lexical Dispersion Plot
gantt

Gantt Durations
delete

Easy File Handling
exclude

Exclude Elements From a Vector
imperative

Intuitively Remark Sentences as Imperative
counts.object_pronoun_type

Question Counts
counts.polarity

Polarity
dist_tab

SPSS Style Frequency Tables
mraja1spl

Romeo and Juliet: Act 1 Dialogue Merged with Demographics and Split
counts.word_stats

Word Stats
left_just

Text Justification
cumulative

Cumulative Scores
is.global

Test If Environment is Global
vertex_apply

Apply Parameter to List of Igraph Vertices/Edges
inspect_text

Inspect Text Vectors
ngrams

Generate ngrams
mcsv_r

Read/Write Multiple csv Files at a Time
diversity

Diversity Statistics
incomplete_replace

Denote Incomplete End Marks With "|"
mraja1

Romeo and Juliet: Act 1 Dialogue Merged with Demographics
object_pronoun_type

Count Object Pronouns Per Grouping Variable
lexical_classification

Lexical Classification Score
outlier_detect

Detect Outliers in Text
name2sex

Names to Gender
plot.cmspans

Plots a cmspans object
new_project

Project Template
plot.Network

Plots a Network Object
paste2

Paste an Unspecified Number Of Text Columns
phrase_net

Phrase Nets
plot.cumulative_end_mark

Plots a cumulative_end_mark Object
plot.animated_lexical_classification

Plots an animated_lexical_classification Object
plot.cumulative_combo_syllable_sum

Plots a cumulative_combo_syllable_sum Object
plot.animated_formality

Plots a animated_formality Object
plot.cumulative_animated_lexical_classification

Plots a cumulative_animated_lexical_classification Object
plot.SMOG

Plots a SMOG Object
plot.end_mark

Plots an end_mark Object
plot.cumulative_animated_polarity

Plots a cumulative_animated_polarity Object
plot.lexical

Plots a lexical Object
plot.lexical_classification

Plots a lexical_classification Object
plot.end_mark_by

Plots a end_mark_by Object
plot.coleman_liau

Plots a coleman_liau Object
plot.end_mark_by_count

Plots a end_mark_by_count Object
gradient_cloud

Gradient Word Cloud
plot.cumulative_formality

Plots a cumulative_formality Object
plot.lexical_classification_preprocessed

Plots a lexical_classification_preprocessed Object
plot.lexical_classification_score

Plots a lexical_classification_score Object
plot.character_table

Plots a character_table Object
plot.cm_distance

Plots a cm_distance object
outlier_labeler

Locate Outliers in Numeric String
plot.kullback_leibler

Plots a kullback_leibler object
plot.cumulative_lexical_classification

Plots a cumulative_lexical_classification Object
plot.gantt

Plots a gantt object
hamlet

Hamlet (Complete & Split by Sentence)
key_merge

Merge Demographic Information with Person/Text Transcript
plot.end_mark_by_preprocessed

Plots a end_mark_by_preprocessed Object
plot.polarity_score

Plots a polarity_score Object
multigsub

Multiple gsub
plot.end_mark_by_proportion

Plots a end_mark_by_proportion Object
plot.end_mark_by_score

Plots a end_mark_by_score Object
plot.animated_discourse_map

Plots an animated_discourse_map Object
kullback_leibler

Kullback Leibler Statistic
plot.automated_readability_index

Plots a automated_readability_index Object
plot.animated_polarity

Plots an animated_polarity Object
plot.animated_character

Plots an animated_character Object
plot.pos

Plots a pos Object
multiscale

Nested Standardization
plot.sent_split

Plots a sent_split Object
plot.discourse_map

Plots a discourse_map Object
plot.question_type_preprocessed

Plots a question_type_preprocessed Object
plot.linsear_write_scores

Plots a linsear_write_scores Object
plot.object_pronoun_type

Plots an object_pronoun_type Object
plot.cumulative_animated_formality

Plots a cumulative_animated_formality Object
plot.readability_count

Plots a readability_count Object
plot.combo_syllable_sum

Plots a combo_syllable_sum Object
plot.subject_pronoun_type

Plots an subject_pronoun_type Object
plot.termco

Plots a termco object
plot.syllable_freq

Plots a syllable_freq Object
plot.table_count

Plots a table_count Object
plot.type_token_ratio

Plots a type_token_ratio Object
plot.word_length

Plots a word_length Object
plot.word_position

Plots a word_position object
plot.diversity

Plots a diversity object
plot.formality

Plots a formality Object
plot.pronoun_type

Plots an pronoun_type Object
polarity

Polarity Score (Sentiment Analysis)
plot.word_stats_counts

Plots a word_stats_counts Object
plot.flesch_kincaid

Plots a flesch_kincaid Object
plot.question_type

Plots a question_type Object
plot.word_proximity

Plots a word_proximity object
plot.word_stats

Plots a word_stats object
preprocessed.object_pronoun_type

Question Counts
plot.wfdf

Plots a wfdf object
plot.weighted_wfm

Plots a weighted_wfm object
plot.linsear_write

Plots a linsear_write Object
plot.linsear_write_count

Plots a linsear_write_count Object
pres_debates2012

2012 U.S. Presidential Debates
preprocessed.pos

Parts of Speech
preprocessed.formality

Formality
plot.cumulative_polarity

Plots a cumulative_polarity Object
plot.cumulative_syllable_freq

Plots a cumulative_syllable_freq Object
plot.freq_terms

Plots a freq_terms Object
plot.formality_scores

Plots a formality_scores Object
plot.polarity

Plots a polarity Object
plot.polarity_count

Plots a polarity_count Object
print.animated_polarity

Prints an animated_polarity Object
plot.pos_preprocessed

Plots a pos_preprocessed Object
plot.table_proportion

Plots a table_proportion Object
pos

Parts of Speech Tagging
potential_NA

Search for Potential Missing Values
print.end_mark

Prints an end_mark object
print.animated_character

Prints an animated_character Object
print.automated_readability_index

Prints an automated_readability_index Object
plot.pos_by

Plots a pos_by Object
plot.table_score

Plots a table_score Object
preprocessed.check_spelling_interactive

Check Spelling
print.end_mark_by

Prints an end_mark_by object
pres_debate_raw2012

First 2012 U.S. Presidential Debate
print.combo_syllable_sum

Prints an combo_syllable_sum object
print.check_text

Prints a check_text Object
print.cm_distance

Prints a cm_distance Object
print.Dissimilarity

Prints a Dissimilarity object
sentiment_frame

Power Score (Sentiment Analysis)
print.cumulative_animated_formality

Prints a cumulative_animated_formality Object
preprocessed.end_mark_by

Question Counts
preprocessed.word_position

Word Position
print.cumulative_polarity

Prints a cumulative_polarity Object
print.linsear_write_count

Prints a linsear_write_count Object
print.readability_score

Prints a readability_score Object
print.linsear_write_scores

Prints a linsear_write_scores Object
preprocessed.lexical_classification

Lexical Classification
print.cumulative_syllable_freq

Prints a cumulative_syllable_freqObject
print.kullback_leibler

Prints a kullback_leibler Object.
plot.rmgantt

Plots a rmgantt object
plot.readability_score

Plots a readability_score Object
plot.sum_cmspans

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

Plots a wfm object
plot.word_cor

Plots a word_cor object
plot.sums_gantt

Plots a sums_gantt object
print.sum_cmspans

Prints a sum_cmspans object
print.sent_split

Prints a sent_split object
print.sums_gantt

Prints a sums_gantt object
preprocessed.pronoun_type

Question Counts
preprocessed.pos_by

Parts of Speech
print.Network

Prints a Network Object
print.word_associate

Prints a word_associate object
print.all_words

Prints an all_words Object
print.boolean_qdap

Prints a boolean_qdap object
print.adjacency_matrix

Prints an adjacency_matrix Object
preprocessed

Generic Preprocessed Method
print.character_table

Prints a character_table object
print.animated_formality

Prints a animated_formality Object
print.SMOG

Prints an SMOG Object
print.word_cor

Prints a word_cor object
preprocessed.question_type

Question Counts
proportions.word_length

Word Length Counts
proportions.termco

Term Counts
print.inspect_text

Prints an inspect_text Object
print.fry

Prints an fry Object
print.polysyllable_sum

Prints an polysyllable_sum object
print.table_count

Prints a table_count object
print.pos

Prints a pos Object.
print.syllable_sum

Prints an syllable_sum object
print.word_position

Prints a word_position object.
print.word_proximity

Prints a word_proximity object
print.cumulative_combo_syllable_sum

Prints a cumulative_combo_syllable_sum Object
print.diversity

Prints a diversity object
print.discourse_map

Prints a discourse_map Object
print.linsear_write

Prints an linsear_write Object
print.cumulative_end_mark

Prints a cumulative_end_mark Object
print.animated_discourse_map

Prints an animated_discourse_map Object
print.lexical_classification_score

Prints a lexical_classification_score Object
print.animated_lexical_classification

Prints an animated_lexical_classification Object
print.cumulative_animated_lexical_classification

Prints a cumulative_animated_lexical_classification Object
pronoun_type

Count Object/Subject Pronouns Per Grouping Variable
print.cumulative_animated_polarity

Prints a cumulative_animated_polarity Object
prop

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

Prints a cumulative_formality Object
preprocessed.subject_pronoun_type

Question Counts
print.cumulative_lexical_classification

Prints a cumulative_lexical_classification Object
print.polarity_score

Prints a polarity_score Object
print.qdap_context

Prints a qdap_context object
print.polarity_count

Prints a polarity_count Object
print.sub_holder

Prints a sub_holder object
print.lexical_classification

Prints an lexical_classification Object
print.question_type

Prints a question_type object
raj.act.1

Romeo and Juliet: Act 1
print.check_spelling_interactive

Prints a check_spelling_interactive Object
print.check_spelling

Prints a check_spelling Object
print.which_misspelled

Prints a which_misspelled Object
print.word_stats

Prints a word_stats object
print.subject_pronoun_type

Prints a subject_pronoun_type object
qdap

qdap: Quantitative Discourse Analysis Package
print.wfm_summary

Prints a wfm_summary Object
print.word_stats_counts

Prints a word_stats_counts object
replace_contraction

Replace Contractions
print.phrase_net

Prints a phrase_net Object
qcv

Quick Character Vector
replace_number

Replace Numbers With Text Representation
proportions.word_position

Word Position
raj.demographics

Romeo and Juliet Demographics
qcombine

Combine Columns
print.lexical_classification_by

Prints a lexical_classification Object
raj.act.3

Romeo and Juliet: Act 3
rajPOS

Romeo and Juliet Split in Parts of Speech
raj.act.2

Romeo and Juliet: Act 2
scores.fry

Readability Measures
print.object_pronoun_type

Prints a object_pronoun_type object
rajSPLIT

Romeo and Juliet (Complete & Split)
raj.act.1POS

Romeo and Juliet: Act 1 Parts of Speech by Person A dataset containing a list from pos_by using the mraja1spl data set (see pos_by for more information).
print.ngrams

Prints an ngrams object
print.lexical_classification_preprocessed

Prints a lexical_classification_preprocessed Object
scores.polarity

Polarity
strip

Strip Text
scores.lexical_classification

Lexical Classification
scores.pos_by

Parts of Speech
subject_pronoun_type

Count Subject Pronouns Per Grouping Variable
print.colsplit2df

Prints a colsplit2df Object.
print.coleman_liau

Prints an coleman_liau Object
print.end_mark_by_preprocessed

Prints a end_mark_by_preprocessed object
print.flesch_kincaid

Prints an flesch_kincaid Object
stemmer

Stem Text
print.question_type_preprocessed

Prints a question_type_preprocessed object
print.polarity

Prints an polarity Object
print.pronoun_type

Prints a pronoun_type object
type_token_ratio

Type-Token Ratio
strWrap

Wrap Character Strings to Format Paragraphs
trans_venn

Venn Diagram by Grouping Variable
proportions.end_mark_by

Question Counts
proportions.pos_by

Parts of Speech
proportions.formality

Formality
print.qdapProj

Prints a qdapProj Object
random_sent

Generate Random Dialogue Data
synonyms

Search For Synonyms
termco

Search For and Count Terms
proportions.pronoun_type

Question Counts
proportions.character_table

Term Counts
print.readability_count

Prints a readability_count Object
print.table_score

Prints a table_score object
print.type_token_ratio

Prints a type_token_ratio Object
print.wfm

Prints a wfm Object
proportions

Generic Proportions Method
print.table_proportion

Prints a table_proportion object
print.pos_preprocessed

Prints a pos_preprocessed object
print.pos_by

Prints a pos_by Object.
print.formality_scores

Prints a formality_scores object
print.formality

Prints a formality Object
visual.discourse_map

Discourse Map
weight

Weight a qdap Object
proportions.question_type

Question Counts
word_proximity

Proximity Matrix Between Words
word_stats

Descriptive Word Statistics
print.termco

Prints a termco object.
print.trunc

Prints a trunc object
qtheme

Add themes to a Network object.
scores.flesch_kincaid

Readability Measures
qprep

Quick Preparation of Text
replace_abbreviation

Replace Abbreviations
replace_symbol

Replace Symbols With Word Equivalents
scores.formality

Formality
word_cor

Find Correlated Words
word_associate

Find Associated Words
replace_ordinal

Replace Mixed Ordinal Numbers With Text Representation
read.transcript

Read Transcripts Into R
rm_stopwords

Remove Stop Words
rank_freq_mplot

Rank Frequency Plot
proportions.subject_pronoun_type

Question Counts
rm_row

Remove Rows That Contain Markers
raw.time.span

Minimal Raw Time Span Data Set
print.word_list

Prints a word_list Object
replacer

Replace Cells in a Matrix or Data Frame
qheat

Quick Heatmap
print.word_length

Prints a word_length object
scores.automated_readability_index

Readability Measures
qdap_df

Create qdap Specific Data Structure
sample.time.span

Minimal Time Span Data Set
scores.coleman_liau

Readability Measures
scores.end_mark_by

Question Counts
scores.termco

Term Counts
scores.subject_pronoun_type

Question Counts
summary.cmspans

Summarize a cmspans object
scores.question_type

Question Counts
proportions.object_pronoun_type

Question Counts
trans_cloud

Word Clouds by Grouping Variable
word_list

Raw Word Lists/Frequency Counts
scores.pronoun_type

Question Counts
raj.act.4

Romeo and Juliet: Act 4
raj

Romeo and Juliet (Unchanged & Complete)
scores.linsear_write

Readability Measures
scores.SMOG

Readability Measures
word_length

Count of Word Lengths Type
trans_context

Print Context Around Indices
proportions.pos

Parts of Speech
question_type

Count of Question Type
scores

Generic Scores Method
raj.act.5

Romeo and Juliet: Act 5
scores.word_stats

Word Stats
scores.character_table

Term Counts
scrubber

Clean Imported Text
scores.word_length

Word Length Counts
scores.word_position

Word Position
scores.object_pronoun_type

Question Counts
summary.wfdf

Summarize a wfdf object
space_fill

Replace Spaces
sentSplit

Sentence Splitting
unique_by

Find Unique Words by Grouping Variable
syllable_sum

Syllabication
summary.wfm

Summarize a wfm object
word_count

Word Counts
word_diff_list

Differences In Word Use Between Groups
visual

Generic visual Method
speakerSplit

Break and Stretch if Multiple Persons per Cell
tot_plot

Visualize Word Length by Turn of Talk
word_network_plot

Word Network Plot
spaste

Add Leading/Trailing Spaces
termco_c

Combine Columns from a termco Object
word_position

Word Position