An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090110/efce3d63/attachment-0001.pl>
Help needed for Loading "tm" package
5 messages · Brian Ripley, Kum-Hoe Hwang
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
1 day later
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
How do you account for the fact that the package passed its checks on the build machine, e.g. http://cran.r-project.org/bin/windows/contrib/2.8/check/RWeka-check.log and no one else is reporting this? (And it does work for me.) Blaming your tools is easy, but doing so on a public forum is disrespectful and against the rw-FAQ http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-install-packages-into-libraries-in-this-version_003f (note the word 'unsupported'). Uwe Ligges does a great job helping Windows' users by building binary packages, and deserves your thanks, not vague and unsubstantiated blame.
On Mon, 12 Jan 2009, Kum-Hoe Hwang wrote:
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?
You definitely shou;d read and follow the FAQ, as this could well be a Java incompatibility with the binary package.
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
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
I appreciate alll helpers for R. I have struggled with Rweka problem related with "tm" text mining package in R. My problem was solved when I replaced RWeka_0.3-15.zip with RWeka_0.3-13.zip under the OS of Win XP. Now my tm package works fine in R. I don't know why it works. Thanks all who gave me good help Kum Hwang Ph.D. On Mon, Jan 12, 2009 at 5:19 PM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
How do you account for the fact that the package passed its checks on the build machine, e.g. http://cran.r-project.org/bin/windows/contrib/2.8/check/RWeka-check.log and no one else is reporting this? (And it does work for me.) Blaming your tools is easy, but doing so on a public forum is disrespectful and against the rw-FAQ http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-install-packages-into-libraries-in-this-version_003f (note the word 'unsupported'). Uwe Ligges does a great job helping Windows' users by building binary packages, and deserves your thanks, not vague and unsubstantiated blame. On Mon, 12 Jan 2009, Kum-Hoe Hwang wrote:
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?
You definitely shou;d read and follow the FAQ, as this could well be a Java incompatibility with the binary package.
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
-- 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