[R] re ading and analyzing a word document

2009-10-01 Thread PDXRugger
file=(LUSDR/letter.doc) Howdy Y'all, So i am looking to read a word document in the following formats(.doc) or any type of accessible word processor software (e.g. text .txt, notepad, etc). Had the ability to search certain words, for instance banana, peacock,Weapons Mass Destruction. Then i

Re: [R] re ading and analyzing a word document

2009-10-01 Thread PDXRugger
Considering your instructions: #Define words to find to.find - c( 'the', 'is', 'are' ,'dr') #Read in the file... file.text - readLines( 'data/letter.txt' ) #Count number of occurnces of deined word in text line.matches - unlist( lapply( to.find, grep, x = unlist(file.text[2]) ) ) Result:

Re: [R] re ading and analyzing a word document

2009-10-01 Thread David Winsemius
On Oct 1, 2009, at 12:18 AM, cls59 wrote PDXRugger wrote: Considering your instructions: #Define words to find to.find - c( 'the', 'is', 'are' ,'dr') #Read in the file... file.text - readLines( 'data/letter.txt' ) #Count number of occurnces of deined word in text line.matches - unlist(

Re: [R] re ading and analyzing a word document

2009-10-01 Thread spencerg
library(sos) tm - findFn('text mining') tm This produced 15 matches, which you could also find using RSiteSearch('text mining', 'function'). The difference is that findFn{sos} displays the results in a table sorted to place the package with the most matches first. In this case, there

Re: [R] re ading and analyzing a word document

2009-09-30 Thread cls59
PDXRugger wrote: Howdy Y'all, So i am looking to read a word document in the following formats(.doc) or any type of accessible word processor software (e.g. text .txt, notepad, etc). Had the ability to search certain words, for instance banana, peacock,Weapons Mass Destruction. Then

Re: [R] re ading and analyzing a word document

2009-09-30 Thread cls59
PDXRugger wrote: Considering your instructions: #Define words to find to.find - c( 'the', 'is', 'are' ,'dr') #Read in the file... file.text - readLines( 'data/letter.txt' ) #Count number of occurnces of deined word in text line.matches - unlist( lapply( to.find, grep, x =