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.
Questions tagged [qdap]
110 questions
0
votes
2 answers
How to Cast a Dataframe into a DTM
I'd like to cast my table into a DTM and maintain the metadata.
Each row should be a document. But in order to use the cast_dtm(), there needs to be a count variable. In order to "cast", it needs to be in the "Document, Term, Count" format.
How…

Alex
- 77
- 1
- 10
0
votes
0 answers
Using R QDAP: can't allocate memory
I've tried to use various function in QDAP, such as word_cor, word_associate, ect..., but I continually get back an error that says "can't allocate vector memory of 1.5gb" (something along these lines).
However, I don't need the function to return…

Alex
- 77
- 1
- 10
0
votes
2 answers
Finding repeated sentences/words/phrases by group over time
I have a data-set in which each column is a variable and each row is an observation (like time series data. It looks like this (I apologize for the format, but I can't show the data):
I'd like to know if a person or group is saying the same…

Alex
- 77
- 1
- 10
0
votes
1 answer
Error in name2sex function in R?
new dataset
"1" "A.Kejriwal Sena"
"2" "Bhanwarlal Sharma"
"3" "Millennium Post"
"4" ""
"5" "Mushkil hai Zindagi"
"6" ""
"7" "niraj"
"8" ""
"9" "Dharmender Malik"
"10" "S. M. Malik"
"11" "Hocalwire"
"12" "mansoor"
"13" "PRRRK"
"14" …

kriti
- 1
- 2
0
votes
1 answer
Replace words in text with words generated using all_words
Being pretty new to qdap, I am not sure whether this functionality is present, but it would be great to have something as mentioned below.
My initial dataset.
ID Keywords
1 112 mills, open heart surgery, great, great job
2 …

NinjaR
- 621
- 6
- 22
0
votes
1 answer
RStudio - change variable based on something contained in another
I'm using RStudio and have an utterance variable and a syllables variable with the syllable count. Every utterance that contains "t-shirt" needs one syllable count more. (Automatically qdap syllable_sum gave "t-shirt" it 1 (it needs 2)).
An…

sparkyjump
- 97
- 1
- 9
0
votes
2 answers
replace some value in dataframe from another dataframe
I have two dataframe:
df1 <- data.frame(id = c("LABEL1", "LABEL2", "LABEL3", "LABEL4", "LABEL5", "LABEL6"),matrix(1:60,6,10))
df1[c(4:6), c(2:4)] = NA
df2 = data.frame(id = c( "LABEL3", "LABEL4", "LABEL5", "LABEL6"),matrix(seq(100,10000, length.out…

Hao WU
- 13
- 3
0
votes
0 answers
R qdap::mgsub prevent replacement to be replaced itself
I'm trying to replace a pattern with another pattern, that contains the pattern to be replaced with qdap::mgsub. Problem is, it will always replace the original pattern in the replacement once more, e.g:
library(qdap)
mgsub(c("102", "981"),…

mattu
- 318
- 2
- 16
0
votes
1 answer
read.table from write.table in R
I'm trying to do a qdap::multigsub in order to fix some typos, misspelled names, variant expressions and some other "aberrations" in a list of climatic event types (yes, it's the NOAA's data set on storms that belongs to an assignment in a coursera…

PavoDive
- 6,322
- 2
- 29
- 55
0
votes
0 answers
To run qdap, why must I repeatedly install gtools with dependencies = T?
I have installed the packages qdap [2.2.0] and gtools [Ver. 3.4.1] which qdap requires. But loading them with library() fails, until I reinstall gtools each time with the argument dependencies = TRUE. What am I doing wrong and not understanding?
>…

lawyeR
- 7,488
- 5
- 33
- 63
0
votes
1 answer
R qdap::mgsub, how to pass a pattern with a regular expression?
In a previous question (replace string in R giving a vector of patterns and vector of replacements) y found that mgsub does have as pattern a string that does not need to br escape. That is good when you want to replace text like '[%.+%]' as a…

Pablo Marin-Garcia
- 4,151
- 2
- 32
- 50
0
votes
2 answers
Emoticons based sentiment
I am working on sentiments and would like to replace the emoticons with words expressing the mood of the emoticon using qdap in R.
Can someone help me how to do it. I will further use the output to get the overall sentiment of the text.

GrayBack
- 1
0
votes
0 answers
Issue with QDAP Top Positive words
I am using QDAP polarity function for my effort.
It works great !!!
I face an issue calculating top positive words
so here is what I did so far
(pol_All_Rev_aftersplit <- with(All_Review_Mod_Split_df, polarity(rm_stopwords(review_text),…

Dutta
- 663
- 2
- 11
- 30
0
votes
1 answer
(Fast) word frequency matrix in R
I am writing an R program that involves analyzing a large amount of unstructured text data and creating a word-frequency matrix. I've been using the wfm and wfdf functions from the qdap package, but have noticed that this is a bit slow for my needs.…

Sean C. Rife
- 103
- 7
0
votes
1 answer
R tm/qdap - Get document based on term
I'm trying to figure out how I could identify documents (tweets in this case) based on a term they may include.
Say I have this data frame (df), which is composed of a list of the screen name of Twitter users and one of their tweets.
> df
…

JohnCoene
- 2,107
- 1
- 14
- 31