On Dec 4, 2007 7:51 AM, gginiu <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> > sage: install_package('sage -i r-2.6.1rc.p1')
>
> I actually installed through command line, but it's mostly same - it
> went ok, but.....
>
> > and report back whether the install works for you or not (it's an 
> > experimental
> > package still, which means that it's likely to *not* work for a lot of 
> > people).
>
> I had to edit manually in 2 places, first $SAGE_HOME/local/bin/R has
> variable R_HOME_DIR pointing to build dir instead of install dir,
> after changing it to right dir I was able to import rpy, because
> before it failed...

Actually, I had posted the wrong direction -- it's still the case that R builds
in the build directory, the install points to that ("make install" for R
doesn't work like for a normal program), then the build directory gets deleted.

See this thread on R in SAge, which has better directions:

http://groups.google.com/group/sage-devel/browse_thread/thread/ca048c096d1819a7/cabec61dcb551eee?lnk=gst&q=rpy#cabec61dcb551eee

In particular, it is best to build like this

     sage -f -m r-2.6.1rc.p1

to leave the build directory around afterwards.

> > If it does install, try this:
> >
> > sage: import rpy
>
> I did:
>
> sage: from rpy import *
>
> and it worked so quite ok... but not exactly yet :)... at first when I
> wanted to check r object I was getting traceback about missing
> variable, after change in file rpy.py in line 312 from
>
>    Rver = self.__getitem__('R_version_string')
>
> to
>
>    Rver = self.__getitem__('R.version.string')
>
> it started to report version, it said:
>
> RPy version 1.0-RC3 [R version 2.6.1 RC (2007-11-24 r43532)]
>
> so ok...
>
> > sage: rpy.r.t_test(range(100))
>
> that test works like a charm...
>
> > Check out
> >      rpy.sourceforge.net
> > for more discussion about rpy, which provides a very
> > fast interface to essentially all the functionality of R.
> > NOTE: As of now, you'll probably want to do
> >     sage: RealNumber = float; Integer = int
> > to turn off preparsing of floats and ints when using R, since
> > the patch for making R play nicely with Sage types isn't in
> > yet.
>
> I noticed Integer -> int problem when I was trying
> http://rpy.sourceforge.net/rpy_demo.html, got without glitch to some
> place, now I try to get:
>
> sage: r.png('faithful_histogram.png',width=int(733),height=int(550))
>
> but no luck currently, anyway I'm still looking around... :)

I was able to get the image to work last time I tried, so it's definitely
possible.

 -- Wiliam

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to