Questions tagged [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.

110 questions
2
votes
1 answer

Matching a list of phrases to a corpus of documents and returning phrase frequency

I have a list of phrases and a corpus of documents.There are 100k+ phrases and 60k+ documents in the corpus. The phrases are might/might not present in the corpus. I'm looking forward to find the term frequency of each phrase present in the…
Debbie
  • 391
  • 2
  • 18
2
votes
2 answers

R: TM package Finding Word Frequency from a Single Column

I've recently been working on trying to find the word frequency within a single column in a data.frame in R using the tm package. While the data.frame itself has many columns that are both numeric and character based, I'm only interested in a single…
Aenderung
  • 23
  • 1
  • 5
2
votes
3 answers

R: How to prevent memory overflow when using mgsub in vector mode?

I have a long vector of characters (e.g. "Hello World", etc), 1.7M rows, and I need to substitute words in them using a map between two vectors, and save the result in same vector. Here's a simple example: library(qdap) line = c("one", "two one",…
Alexey Ferapontov
  • 5,029
  • 4
  • 22
  • 39
2
votes
1 answer

transpose row to column in R using qdap

I have been using the wfm function in "qdap" package for transposing the text row values into columns and ran into problem when the data contains numbers along with text. For example if the row value is "abcdef" the transpose works fine but if the…
Shankar_m
  • 65
  • 2
  • 6
2
votes
1 answer

sentSplit() in qdap has issues when there are no endmarks

I am using the qdap package for polarity analysis. In the CSV file I have a sentence without punctuation like "Sucks to not be removable" (no period). After using sentsplit on the dataframe, this row is showing NA. How do I add endmarks to the…
Dutta
  • 663
  • 2
  • 11
  • 30
1
vote
0 answers

Error when using qdap synonyms command: RAW() can only be applied to a 'raw', not a 'list'

I'm familiarizing myself with the qdap package in R, and am trying to re-run some of the example code in the package vignette, but I keep running into issues. When I run the following code, I get the error message: Error in derive_pubkey(key)…
Ardyn
  • 125
  • 2
  • 7
1
vote
1 answer

qdapRegex::rm_nchar_words returns different results when non English letters involved?

Please help me with the following confusion: qdapRegex::rm_nchar_words("è ûé", "1,2") [1] "è ûé" qdapRegex::rm_nchar_words('k ku ppp d', "1,2") [1] "ppp" Why in the first code line it doesn't respond with "" but in the second one it works as…
SteveS
  • 3,789
  • 5
  • 30
  • 64
1
vote
0 answers

Installing the "qdap" package

The following error is displayed: Unable to find any JVMs matching version "(null)". No Java runtime present, try --request to install. Error: package or namespace load failed for ‘qdap’: .onLoad failed in loadNamespace() for 'rJava', details: …
1
vote
1 answer

Remove special characters in R from .docx

I've seen various posts about removing special characters in R (such as this one: Remove all special characters from a string in R?), but none of the strategies have worked for my issue. I have a transcript that I am reading in with qdap's…
J.Sabree
  • 2,280
  • 19
  • 48
1
vote
3 answers

How to switch smoothly from qdap::mgsub() to textclean::mgsub()?

Due to R release issues I need to switch between qdap::mgsub() and textclean::mgsub(). The functions are almost the same, except for the order of the arguments: qdap::mgsub(pattern,replacement,x) textclean::mgsub(x,pattern,replacement) I have a lot…
rdatasculptor
  • 8,112
  • 14
  • 56
  • 81
1
vote
2 answers

beg2char function in R (qdap package)

I am trying keep only that part of the string left of "keyword". Anything on the right of "keyword" should be removed. beg2char seems like the best choice but its not doing what I thought it would do. Please advise: x…
nrcjea001
  • 1,027
  • 1
  • 9
  • 21
1
vote
3 answers

Add synonyms from qdap to a preexisting dataframe in R

I have created the following dataframe df in R Sl NO Word 1 get 2 Free 3 Joshi 4 Hello 5 New I have used this code to get a list of synonyms but the same are in the form of a list library(qdap) …
Raghavan vmvs
  • 1,213
  • 1
  • 10
  • 29
1
vote
0 answers

Limiting word count in a character column in R and saving extra words in another variable

We are moving data from an old ERP system to a new one, the new one limits the description of items to 50 words, while the older one had no such limit. How can I ask R to remove the words at the end of the string if they are more than 50? Edit: The…
pyeR_biz
  • 986
  • 12
  • 36
1
vote
1 answer

Loading 'qdap' package failed in R

I have gone through the threads related to qdap but their problem is not the same as mine. Moreover, many of them do not have accepted answers. I installed 'qdap' package but when I load it using library(qdap), it returns the following…
RforResearch
  • 401
  • 8
  • 16
1
vote
0 answers

Special characters turning up in tm package/ qdap output

I am trying to create a term-document matrix in R using the following dataset EmailSubject Buy the stunning new phone The game changer is here. Experience a phone ahead of its time. Thank You Chennai Limited Period offer Valentines day special Buy…
Vishnu Raghavan
  • 83
  • 1
  • 10