Hi Minh,
Thank you!
I entered the command and got the same output as yours, but still no luck :(
After I restarted Sage and tried to load library I got the ImportError:
sage:r.library("cluster")
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/root/sage-4.0.2-linux-CentOS_release_5.2_Final-i686-Linux/<ipython
console> in <module>()
/root/sage-4.0.2-linux-CentOS_release_5.2_Final-i686-Linux/local/lib/python2.5/site-packages/sage/interfaces/r.pyc
in library(self, library_name)
554 ret = self.eval('require("%s")'%library_name)
555 if 'there is no package' in ret:
--> 556 raise ImportError, "there is no package called
'%s'"%library_name
557 else:
558 try:
ImportError: there is no package called 'cluster'
I guess it's also some newbie mistake. I googled it but didn't find a
reason why R doesn't "see" the package. Any hint will be appreciated.
2009/7/14 Minh Nguyen <[email protected]>:
>
> Hi Aleksey,
>
> On Tue, Jul 14, 2009 at 6:41 PM, Aleksey
> Gogolev<[email protected]> wrote:
>>
>> Hello!
>>
>> I tried to install package "cluster" for R and got this:
>>
>> ----------------------------------------------------------------------
>> | Sage Version 4.0.2, Release Date: 2009-06-18 |
>> | Type notebook() for the GUI, and license() for information. |
>> ----------------------------------------------------------------------
>> sage: r.install_package("cluster")
>> Error: object "sage1" not found
>> sage: r.install_package("cluster")
>> Error: object "sage2" not found
>> sage: r.install_package("cluster")
>>
>> Can somebody give a hint what is wrong?
>
> The correct command is r.install_packages(); notice the extra "s". For
> example:
>
> ----------------------------------------------------------------------
> | Sage Version 4.1, Release Date: 2009-07-09 |
> | Type notebook() for the GUI, and license() for information. |
> ----------------------------------------------------------------------
> sage: r.install_packages("cluster")
> 0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (0major+212minor)pagefaults 0swaps
>
> R version 2.6.1 (2007-11-26)
> Copyright (C) 2007 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> options(repos="http://cran.r-project.org/"); install.packages("cluster")
> trying URL 'http://cran.r-project.org/src/contrib/cluster_1.12.0.tar.gz'
> Content type 'application/x-gzip' length 215041 bytes (210 Kb)
> opened URL
> ==================================================
> downloaded 210 Kb
>
> WARNING: ignoring environment value of R_HOME
> .: 121: Can't open /scratch/mvngu/sage-4.1/local/lib/R/share/sh/dcf.sh
>
> The downloaded packages are in
> /tmp/Rtmpq9wIvZ/downloaded_packages
> Updating HTML index of packages in '.Library'
> Warning messages:
> 1: In install.packages("cluster") :
> installation of package 'cluster' had non-zero exit status
> 2: In tools:::unix.packages.html(.Library) :
> cannot create HTML package index
>>
> Please restart Sage or restart the R interface (via r.restart()) in
> order to use 'cluster'.
>
> --
> Regards
> Minh Van Nguyen
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---