Re: [R] Comparing 2 dale columns

2017-08-23 Thread Patrick Casimir
Thanks. But when I apply your codes I get all NA instead of TRUE and FALSE From: PIKAL Petr <petr.pi...@precheza.cz> Sent: Wednesday, August 23, 2017 11:20:00 AM To: Patrick Casimir; r-help@r-project.org Subject: RE: Comparing 2 dale columns Hi you

Re: [R] Comparing 2 dale columns

2017-08-23 Thread Patrick Casimir
Hi Mark, Instead of 1 and 0. It generates NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA From: Mark Sharp <msh...@txbiomed.org> Sent: Wednesday, August 23, 2017 11:28:39 AM To: Patrick Casimir Cc: r-help@r-project.org Subject:

[R] Comparing 2 dale columns

2017-08-23 Thread Patrick Casimir
Dear R fellows, I created a new column Date_flag to compare the dates of COL1 and COL2 using the code below. But it showed that 5/1/15 is greater than 6/1/2014 and 5/1/2015 greater than 7/1/2014 despite the year is greater. How do I fix that? I did try to format as %y/%m/%d but it does not

Re: [R] Convert Factor to Date

2017-08-22 Thread Patrick Casimir
ject: Re: [R] Convert Factor to Date On 2017-08-22 1:30 PM, Patrick Casimir wrote: > Dear R Fellows, > > > I Have a dataset( data1) with 2 columns of date showing a class of factor. > How to convert them to date? Then compare them, keep the greater date only in > a new c

[R] Convert Factor to Date

2017-08-22 Thread Patrick Casimir
Dear R Fellows, I Have a dataset( data1) with 2 columns of date showing a class of factor. How to convert them to date? Then compare them, keep the greater date only in a new column. Using as.Date to change the class to Date but the data becomes NA. Much Thanks COL1COL2 Apr-16

Re: [R] find similar words in text

2017-08-03 Thread Patrick Casimir
Use tm package and create a corpus to capture terms from the TDM within the corpus. Then you can apply as.matrix() to display terms' occurences. Go to CRAN and read about tm package. From: R-help on behalf of Boris Steipe

Re: [R] count number of stop words in R

2017-06-12 Thread Patrick Casimir
6 Type Package Title Bridging the Gap Between Qualitative Data and Quantitative Analysis Version 2.2.5 Date 2016-06-15 Patrick Casimir, PhD Health Analytics, Data Science, Big Data Expert & Independent Consultant C: 954.614.1178 From: Elahe chalabi &

Re: [R] count number of stop words in R

2017-06-12 Thread Patrick Casimir
you can use summary (my string) Patrick Casimir, PhD Health Analytics, Data Science, Big Data Expert & Independent Consultant C: 954.614.1178 From: Elahe chalabi <chalabi.el...@yahoo.de> Sent: Monday, June 12, 2017 11:42:43 AM To: Patrick Casimir; B

Re: [R] count number of stop words in R

2017-06-12 Thread Patrick Casimir
e water is overflowing in the sink . And the dishes might get falled over if you don't fell fall over there there if you don't get it . And it there it's a picture of a kitchen window . And the curtains are very uh distinct . But the water is still flowing." Patrick Casimir, PhD Health Analytics,

Re: [R] count number of stop words in R

2017-06-12 Thread Patrick Casimir
You can define stop words as below. data <- tm_map(data, removeWords, stopwords("english")) Patrick Casimir, PhD Health Analytics, Data Science, Big Data Expert & Independent Consultant C: 954.614.1178 From: R-help <r-help-boun...@r-pr

Re: [R] PROBLEM USING DICTIONARY WITH TM PACKAGE

2017-05-20 Thread Patrick Casimir
returns from all docs in the DTM Patrick Casimir, PhD Health Analytics, Data Science, Big Data Expert & Independent Consultant C: 954.614.1178 From: Jeff Newmiller <jdnew...@dcn.davis.ca.us> Sent: Friday, May 19, 2017 11:04:22 AM To: r-help@r-project.org; Pa

Re: [R] PROBLEM USING DICTIONARY WITH TM PACKAGE

2017-05-19 Thread Patrick Casimir
Thanks Jeff. I will try elsewhere. Patrick Casimir, PhD Health Analytics, Data Science, Big Data Expert & Independent Consultant C: 954.614.1178 From: Jeff Newmiller <jdnew...@dcn.davis.ca.us> Sent: Friday, May 19, 2017 11:04:22 AM To: r-help@r-p

[R] PROBLEM USING DICTIONARY WITH TM PACKAGE

2017-05-19 Thread Patrick Casimir
2 Patient24.txt 1112 4 Patient25.txt 8 9 4 Patient41.txt 810 4 Patient46.txt 810 3 Patient8.txt 912 2 Patient9.txt 823 2 Thanks

[R] CREATE DICTIONARY WITH TM PACKAGE

2017-05-17 Thread Patrick Casimir
xt 1112 4 Patient25.txt 8 9 4 Patient41.txt 810 4 Patient46.txt 810 3 Patient8.txt 912 2 Patient9.txt 823 2 Thanks Patrick Casi

[R] Dictionary not showing full list of trems with tm Package

2017-05-16 Thread Patrick Casimir
Hello Fellows, I want to use dictionary function to capture all specific terms from a corpus of 102 docs but the dictionary only captures those terms in 10 documents. I need those terms from all 102 docs. Any idea why? How do I get the dictionary to return for all 102 docs? See my coding

[R] Uisng a Dictionary with tm Package

2017-05-15 Thread Patrick Casimir
Hello Fellows, I used the dictionary function to capture terms from a corpus of 102 docs but the dictionary only captures those terms in 10 documents. I need those terms from all 102 docs. Any idea why? How do I get the dictionary to return for all 102 docs? See my coding below. > myTerms

Re: [R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Patrick Casimir
Will do. From: Ista Zahn <istaz...@gmail.com> Sent: Tuesday, December 6, 2016 2:49:30 PM To: Patrick Casimir Cc: r-help@r-project.org Subject: Re: [R] Why is DocumentTermMatrix showing 0 term? On Tue, Dec 6, 2016 at 2:28 PM, Patrick Casimir <patrc...

Re: [R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Patrick Casimir
on-/sparse entries: 920/2144 Sparsity : 70% Maximal term length: 29 Weighting : term frequency (tf) From: Ista Zahn <istaz...@gmail.com> Sent: Tuesday, December 6, 2016 12:20:57 PM To: Patrick Casimir Cc: r-help@r-project.org Subject: Re: [

Re: [R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Patrick Casimir
; Metadata: 7 Content: chars: 2366 From: Ista Zahn <istaz...@gmail.com> Sent: Tuesday, December 6, 2016 10:08:28 AM To: Patrick Casimir Cc: r-help@r-project.org Subject: Re: [R] Why is DocumentTermMatrix showing 0 term? What is in docs? What does inspect(docs) say? --Ista On Tu

Re: [R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Patrick Casimir
ds, stopwords("english")) > inspect(docs[1]) > docs <- tm_map(docs, stripWhitespace) > docs <- tm_map(docs, stemDocument) > dtm <- DocumentTermMatrix(docs) > dtm <> Non-/sparse entries: 0/0 Sparsity : 100% Maximal term length: 0 Weighting : te

[R] Why is DocumentTermMatrix showing 0 term?

2016-12-06 Thread Patrick Casimir
<> Non-/sparse entries: 0/0 Sparsity : 100% Maximal term length: 0 Weighting : term frequency (tf) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] DocumentTermMatrix

2016-12-01 Thread Patrick Casimir
My dtm is showing the 4 files in the corpus correctly, but the number of terms is incorrect at 0. What can cause that? dtm <- DocumentTermMatrix(docs) dtm ## <> __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see