[R] Library (tm) Error: could not find function "TermDocMatrix".

Peter Ehlers ehlers at ucalgary.ca
Fri Apr 23 22:26:23 CEST 2010


Package tm does not have a function TermDocMatrix.
Where did you get the idea that it does?

There _is_ a function TermDocumentMatrix, however.

  -Peter Ehlers

On 2010-04-23 10:21, Ignacio mas data wrote:
>
> Hi List
>
> I have the next code and the error. I have try with other codes and I have
> the same problem.
>
>> reut21578<- system.file("texts", "crude", package = "tm")
>> (r<- Corpus(DirSource(reut21578), readerControl = list(reader =
>> readReut21578XMLasPlain)))
> A corpus with 20 text documents
>
>
>> (r<- Corpus(DirSource(reut21578), readerControl = list(reader =
>> readReut21578XMLasPlain)))>  >
>> summary(r)
> A corpus with 20 text documents
>
> The metadata consists of 2 tag-value pairs and a data frame
> Available tags are:
>    create_date creator
> Available variables in the data frame are:
>    MetaID
>> rec.matrix<- TermDocMatrix(r)
> Error: no se pudo encontrar la función "TermDocMatrix"
>
> Error: could not find function "TermDocMatrix".
>
>
> Thanks
>
>
>

-- 
Peter Ehlers
University of Calgary



More information about the R-help mailing list