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
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:
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(
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
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
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 =
6 matches
Mail list logo