[R] Help needed for Loading "tm" package

Kum-Hoe Hwang phdhwang at gmail.com
Mon Jan 12 07:05:32 CET 2009


Thank Prof. Brian Ripley for your comments.

Based on Prof Brian Ripley's comments, I checked Java environments in
my PC. But I have not solved a "tm" package problem in Win R software.
I am not sure but my current conclusion is that the Win-based R binary
software has definitely a problem with Rweka package or subpackage.

Should I wait for another upgraded R binary version under the window
XP, "tm' package or Rweka ets?
Or I'd better migrate to non-window OS such as Linux, etc?

Kum Hwang, Ph.D.

On Sat, Jan 10, 2009 at 8:06 PM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
> On Sat, 10 Jan 2009, Kum-Hoe Hwang wrote:
>
>> Howdy Gurus again
>>
>> Thanks to  Tony.Breyal, I was able to writing the following script for
>> analyzing a text document.
>> But I got an error with "tm' package. I don't why I got the error from the
>> R
>> script below. I think I followed proccess of R tm manual.
>
> Please do read the messages you got.  I see
>
>> Error in .jinit(system.file("jar", c("weka.jar", "RWeka.jar"), package =
>> pkgname,  :
>>  Cannot create Java virtual machine (-1)
>
> so the problem is with your Java installation and RWeka, not 'tm'.
>
> First make sure you have a working installation of RWeka -- I suspect you do
> not even have Java installed, but it could be a version or path issue (but
> very unlikely to be an R issue).
>
>>
>> I use R v2.8.1. and tm_0.3-3.zip under Win XP.
>>
>> Thanks in advance,
>>
>> Kum Hwang
>>
>>> # setting directory
>>> my.path <-'C:\\_work\\Daddy"s\\myProjects\\2009
>>
>> defaultProject\\R\\textfile\\'
>>>
>>> # text miner pakacge
>>> library(tm)
>>
>> Loading required package: Snowball
>> Loading required package: RWeka
>> ---------------------------------------------------------
>> Error in .jinit(system.file("jar", c("weka.jar", "RWeka.jar"), package =
>> pkgname,  :
>>  Cannot create Java virtual machine (-1)
>> Error : .onLoad failed in 'loadNamespace' for 'RWeka'
>> Error: package 'RWeka' could not be loaded
>>>
>>> my.corpurs <-Corpus(DirSource(my.path), readerControl =
>>
>> list(reader=readPlain))
>> Error: could not find function "Corpus"
>>>
>>> my.tdm <- TermDocMatrix(my.corpus)
>>
>> Error: could not find function "TermDocMatrix"
>>>
>>> my.tdm[1,]
>>
>> Error: object "my.tdm" not found
>>
>>
>> --
>> Kum-Hoe Hwang, Ph.D.
>>
>> Phone : 82-31-250-3516
>> Email : phdhwang at gmail.com
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> --
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>



-- 
Kum-Hoe Hwang, Ph.D.

Phone : 82-31-250-3516
Email : phdhwang at gmail.com




More information about the R-help mailing list