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 : phdhw...@gmail.com

        [[alternative HTML version deleted]]

______________________________________________
R-help@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,                  rip...@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

______________________________________________
R-help@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.

Reply via email to