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
1
vote
1 answer
arrange some columns by name and then include all the others
I am working with wide dataframes that I am popping in and out off frequently with View() in RStudio. Most of my attention is on a few columns to the left but I constantly need to scroll to columns out of frame on the far right. Is there a 'quick…

CallumH
- 751
- 1
- 7
- 22
1
vote
2 answers
Count number of times a word-wildcard appears in text (in R)
I have a vector of either regular words ("activated") or wildcard words ("activat*"). I want to:
1) Count the number of times each word appears in a given text (i.e., if "activated" appears in text, "activated" frequency would be 1).
2) Count the…

David Spivak
- 81
- 9
1
vote
0 answers
R library(qdap) installation error
I am having difficulty installing the qdap library, see below:
I installed the Java library first, and then the qdap library:
Sys.setenv(JAVA_HOME='C:\Program Files (x86)\Java\jre7')
library(rJava)
then the devtools library:
…

user2892196
- 59
- 2
- 6
1
vote
1 answer
R-How dos the pos() function work for parts-of-speech tagging
I'm new to R and confused with the way the pos() function works. Here's why:
Example:
library(qdap)
s1<-c("Hello World")
pos(s1)
This produces the correct output saying the word count
wrd.cnt - 2
NN -1(50%)
UH-1(50%)
whereas the…

G_1991
- 139
- 11
1
vote
1 answer
Can't plot Zipf's law in R
I have a big list of terms and their frequency loaded from a text file and I converted it to a table:
myTbl = read.table("word_count.txt") # read text file
colnames(myTbl)<-c("term", "frequency")
head(myTbl, n = 10)
> head(myTbl, n = 10)
…

Vladimir Stazhilov
- 1,956
- 4
- 31
- 63
1
vote
1 answer
sentiment analysis with different number of documents
I am trying to do sentiment analysis on newspaper articles and track the sentiment level across time. To do that, basically I will identify all the relevant news articles within a day, feed them into the polarity() function and obtain the average…

Seamus Lam
- 155
- 3
- 10
1
vote
2 answers
R: match and replace string. mgsub does not work
I have two data frames. The first data frame lib is a library with words in two columns. The second data frame data1 should be transformed as follows: The strings matched in column data1$V1 against lib$V2 should be replaced with the string in the…

OAM
- 179
- 1
- 14
1
vote
1 answer
Plot results from dist_tab() function from qdap library
I am interested in plotting the results from the following code which produces a frequency distribution table. I would like to graph the Freq column as a bar with the cum.Freq as a line both sharing the interval column as the…

user3513178
- 73
- 1
- 1
- 5
1
vote
0 answers
Is there a lookup function in R like vlookup in excel?
i want to know if there is a lookup() function in R package 'qdap'. I installed it and tried to use it, but throws up an error "could not find function "lookup".
for(k in 1:nrow(mtmModFrame)){
mtmModFrame$mtm[k]<- lookup(uiqFrame$DATE[k],…

random_walker
- 11
- 2
1
vote
2 answers
Strip function in qdap package in R - Removes slash incorrectly
I have a text file, which is several hundred rows long. I am trying to remove all of the [edit:add] punctuation characters from it except the "/" characters. I am currently using the strip function in the qdap package.
Here is a sample data…

user1738753
- 626
- 4
- 12
- 19
1
vote
3 answers
Dynamically change column names based on inputs
I am trying to dynamically name the output of a data frame based upon the inputs.
get.max2 <- function(data = NULL, column)
{
#require(qdap)
col <- eval(substitute(column), data)
max <- max(eval(substitute(column), data))
name <- lookup(col,…

maloneypatr
- 3,562
- 4
- 23
- 33
0
votes
0 answers
How does one install rJava and qdap onto RLibrary?
I was working on an assignment that requires installing a number of packages (including rJava and qdap), and I was sucessful at that. But when I installed those projects onto RLibrary, I couldn't install Java and qdap.
I got the following errors:
>…

Grant
- 1
0
votes
0 answers
Expand word contraction
I am writing a function to expand the word contraction. It takes a dataframe as input parameter and outputs the dataframe with "clean_text" column with the expanded pattern in the text. I can do this by using qdap mgsub function to replace the…

Dutt
- 301
- 1
- 9
0
votes
1 answer
Trouble Installing qdap package into R
I want to install "qdap" package to run a text mining project. I tried installing the package in many different ways:
1. intsall.packages("qdap")
2. Downloading the file locally then installing
3. Using…

Mohamad Yassin
- 1
- 1
0
votes
2 answers
What R package is suited to identifying words that are positively correlated with a binary response variable
I have a tibble that has to three columns:
wine - Name of the wine
wine_description - Words describing wine (punctuation has been stripped out)
target - 0 or 1 variable 1 = Top Rated Wine, 0 = Not Top Rated Wine
What R package might I use if I…

Mutuelinvestor
- 3,384
- 10
- 44
- 75