As a further update for those interested, the above method works in
both binary windows (vmware) and linux versions. However, on Linux, an
easier method is to install sage from the binary, and then reinstall R
from source. This incidentally enables png, jpeg and X11 in R if the
required development libraries are installed.

As follows:
1. Download and install the sage binary into it's final location. (I
put mine in /usr/local/lib, which is why I use sudo in the next couple
of steps.)
2. Make sure png, jpeg and x11 development libraries are installed.
     sudo apt-get install libjpeg-dev libpng-dev libx11-dev (on ubuntu
10.04)
3. Start sage with the right permissions.
     sudo sage
4. Inside sage, run install_package("R-2.10.1.p2", force=True)
(As an aside, I wish the install_package command would accept package
names without the versions in it. As it is, this step requires me to
go to the sagemath website and see what the version for the default R
spgk is.)
5. Exit sage, restart, and test it out.

Joal Heagney

On Aug 4, 6:44 pm, ancienthart <joalheag...@gmail.com> wrote:
> Hi kcrisman,
> Yes, this was the latest binary release of sage, on an ubuntu
> machine,
> sage-4.5-linux-64bit-ubuntu_10.04_lts-x86_64-Linux.tar.lzma
>
> I suspect that the only thing I need to change is the R_INCLUDE_HOME=
> lines, but when I try to get something working, I don't like to leave
> anything to chance. Saves testing and editing time. :)
>
> JoalHeagney
>
> On Aug 3, 12:34 am, kcrisman <kcris...@gmail.com> wrote:
>
> > DearJoal,
>
> > Was this a downloaded binary?  The variable '/scratch/...' seems to
> > indicate this is the case.  This is usually not a problem on a 'home-
> > built' one - I've installed lots of R packages using
>
> > sage: r.install_packages()
>
> > I'm opening a Trac ticket for this, but unfortunately don't know
> > enough about building to fix it.  This is 
> > nowhttp://trac.sagemath.org/sage_trac/ticket/9668
>
> > Thanks!  And glad you were able to get it working.
>
> > - kcrisman
>
> > On Aug 2, 8:29 am, ancienthart <joalheag...@gmail.com> wrote:
>
> > > *sigh*
> > > And I bludgeon the solution out the very next night.
> > > Here is how I got the optional package automap to install into a
> > > binary sage R.
>
> > > Go into the sage directory and edit the following files:
> > > local/bin/R and local/lib/R/bin/R
> > > and change all the hard-set user variables "/scratch/...." to the true
> > > locations of R_HOME_DIR, R_HOME, R_INCLUDE_DIR, R_SHARE_DIR and for
> > > good measure, R_DOC_DIR. Replace the default string EVERYWHERE in the
> > > file.
>
> > > I then exported SAGE_HOME as well (Not sure that this is needed.), and
> > > run local/bin/R
>
> > > Inside R, install.packages("automap")
>
> > > No more build errors, and when I restart R, automap loads using
> > > library. Just have to try it out from sage now.
> > > Any chance there's a script to find all of these hard-set strings and
> > > change them to correct values?
>
> > >JoalHeagney
>
> > > On Aug 1, 11:02 am, ancienthart <joalheag...@gmail.com> wrote:
>
> > > > Hi guys and gals,
> > > > I'm having some difficulty installing gstat, automap and sp into the
> > > > sage R environment.
> > > > I keep getting an error saying that the "sage R include directory is
> > > > empty"
>
> > > > Is there a way I can fix this?
>
> > > >JoalHeagney

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to