Health Analytics, Data Science, Big Data Expert & Independent Consultant
> C: 954.614.1178
>
>
>
> From: R-help on behalf of Bert Gunter
>
> Sent: Monday, June 12, 2017 10:12:33 AM
> To: Elahe chalabi
> Cc: R-help Mailing List
&g
lt;- DocumentTermMatrix(corp, cntrl)
col_sums(dtm[, which(colnames(dtm) %in% stopwords("en"))])
Best,
Florian
Gesendet: Montag, 12. Juni 2017 um 16:12 Uhr
Von: "Bert Gunter"
An: "Elahe chalabi"
Cc: "R-help Mailing List"
Betreff: Re: [R] count numbe
nday, June 12, 2017 11:42:43 AM
To: Patrick Casimir; Bert Gunter
Cc: R-help Mailing List
Subject: Re: [R] count number of stop words in R
Defining data as you mentioned in your respond causes the following error:
Error in UseMethod("tm_map", x) :
no applicable method for 'tm_map
List
Subject: Re: [R] count number of stop words in R
Defining data as you mentioned in your respond causes the following error:
Error in UseMethod("tm_map", x) :
no applicable method for 'tm_map' applied to an object of class "character"
I can solve this error by us
June 12, 2017 11:23:42 AM
To: Patrick Casimir; Bert Gunter
Cc: R-help Mailing List
Subject: Re: [R] count number of stop words in R
Thanks for your reply. I know the command
data <- tm_map(data, removeWords, stopwords("english"))
removes English stop words, I don't know how sho
rick Casimir, PhD
Health Analytics, Data Science, Big Data Expert & Independent Consultant
C: 954.614.1178
From: Elahe chalabi
Sent: Monday, June 12, 2017 11:23:42 AM
To: Patrick Casimir; Bert Gunter
Cc: R-help Mailing List
Subject: Re: [R] count number o
lish"))
Patrick Casimir, PhD
Health Analytics, Data Science, Big Data Expert & Independent Consultant
C: 954.614.1178
From: R-help on behalf of Bert Gunter
Sent: Monday, June 12, 2017 10:12:33 AM
To: Elahe chalabi
Cc: R-help Mailing List
Subject:
er
Sent: Monday, June 12, 2017 10:12:33 AM
To: Elahe chalabi
Cc: R-help Mailing List
Subject: Re: [R] count number of stop words in R
You can use regular expressions.
?regex and/or the stringr package are good places to start. Of
course, you have to define "stop words."
Cheers,
Bert
You can use regular expressions.
?regex and/or the stringr package are good places to start. Of
course, you have to define "stop words."
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathe
Hi all,
Is there a way in R to count the number of stop words (English) of a string
using tm package?
str="Mhm . Alright . There's um a young boy that's getting a cookie jar . And
it he's uh in bad shape because uh the thing is falling over . And in the
picture the mother is washing dishes and
10 matches
Mail list logo