kcrisman wrote:
>
> I opened a ticket for the bad doctest:
> http://trac.sagemath.org/sage_trac/ticket/7521
>
>>> Still not sure why this doesn't work; in fact, it's supposed to be
>>> included in every *binary* shipped, obviously that doesn't apply
>>> directly to Sage...
>> The R spkg does not compile the standard packages that come with R.
>> There is a specific switch in the spkg-install that prevents this. I
>> think the reasons are mainly historical, and the sage copy of R should
>> have these enabled, if possible. You can see what I'm talking about if
>> you look at the spkg-install, IIRC.
>
> Okay, but how do I get this library "now", as it were? It's weird
> that I can load another package by name, but not this one. If I can
> get this one loaded, I think I can use our speaker's examples.
> Otherwise I need other examples.
I just modified the R spkg-install thusly:
diff -r b73bca59a75a spkg-install
--- a/spkg-install Sun Sep 20 18:25:26 2009 -0700
+++ b/spkg-install Mon Nov 23 20:35:29 2009 -0600
@@ -77,19 +77,17 @@
CFLAGS="-I$SAGE_LOCAL/include -L$SAGE_LOCAL/lib/ "$CFLAGS; export CFLAGS
LDFLAGS="-L$SAGE_LOCAL/lib/ "$LDFLAGS; export LDFLAGS
-# do not build recommended packages for now, for speed.
-
if [ `uname` = "Darwin" ]; then
echo "Configuring R for OSX"
- ./configure --prefix="$SAGE_LOCAL" --with-recommended-packages=no
--enable-R-shlib --with-x=$XSUPPORT --with-readline="$SAGE_LOCAL" $OSXFW
+ ./configure --prefix="$SAGE_LOCAL" --enable-R-shlib
--with-x=$XSUPPORT --with-readline="$SAGE_LOCAL" $OSXFW
else
echo "Configuring R with ATLAS"
- ./configure --prefix="$SAGE_LOCAL" --with-recommended-packages=no
--enable-R-shlib --with-x=$XSUPPORT --with-readline="$SAGE_LOCAL"
--with-blas="-L$SAGE_LOCAL/lib -lf77blas -latlas"
--with-lapack="-L$SAGE_LOCAL/lib -llapack -lcblas" $SUN_FLAGS
+ ./configure --prefix="$SAGE_LOCAL" --enable-R-shlib
--with-x=$XSUPPORT --with-readline="$SAGE_LOCAL"
--with-blas="-L$SAGE_LOCAL/lib -lf77blas -latlas"
--with-lapack="-L$SAGE_LOCAL/lib -llapack -lcblas" $SUN_FLAGS
fi
if [ $? -ne 0 ]; then
echo "Configuring R with fallback options"
- ./configure --prefix="$SAGE_LOCAL" --with-recommended-packages=no
--enable-R-shlib --with-x=no --with-readline="$SAGE_LOCAL" $OSXFW $SUN_FLAGS
+ ./configure --prefix="$SAGE_LOCAL" --enable-R-shlib --with-x=no
--with-readline="$SAGE_LOCAL" $OSXFW $SUN_FLAGS
fi
if [ $? -ne 0 ]; then
(I just removed the --with-recommended-packages=no switch from all
command lines)
Then I installed the new spkg with:
sage -f r-2.9.2.spkg
After a long build, I now get:
sage: r.installed_packages()
Package LibPath Version
Priority Bundle
base "base" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
boot "boot" "/home/jason/sage/local/lib/R//library" "1.2-38"
"recommended" NA
class "class" "/home/jason/sage/local/lib/R//library" "7.2-48"
"recommended" "VR"
cluster "cluster" "/home/jason/sage/local/lib/R//library" "1.12.0"
"recommended" NA
codetools "codetools" "/home/jason/sage/local/lib/R//library" "0.2-2"
"recommended" NA
datasets "datasets" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
foreign "foreign" "/home/jason/sage/local/lib/R//library" "0.8-37"
"recommended" NA
graphics "graphics" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
grDevices "grDevices" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
grid "grid" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
KernSmooth "KernSmooth" "/home/jason/sage/local/lib/R//library" "2.23-2"
"recommended" NA
lattice "lattice" "/home/jason/sage/local/lib/R//library"
"0.17-25" "recommended" NA
MASS "MASS" "/home/jason/sage/local/lib/R//library" "7.2-48"
"recommended" "VR"
Matrix "Matrix" "/home/jason/sage/local/lib/R//library"
"0.999375-30" "recommended" NA
methods "methods" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
mgcv "mgcv" "/home/jason/sage/local/lib/R//library" "1.5-5"
"recommended" NA
nlme "nlme" "/home/jason/sage/local/lib/R//library" "3.1-93"
"recommended" NA
nnet "nnet" "/home/jason/sage/local/lib/R//library" "7.2-48"
"recommended" "VR"
rpart "rpart" "/home/jason/sage/local/lib/R//library" "3.1-45"
"recommended" NA
spatial "spatial" "/home/jason/sage/local/lib/R//library" "7.2-48"
"recommended" "VR"
splines "splines" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
stats "stats" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
stats4 "stats4" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
survival "survival" "/home/jason/sage/local/lib/R//library" "2.35-4"
"recommended" NA
tcltk "tcltk" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
tools "tools" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
utils "utils" "/home/jason/sage/local/lib/R//library" "2.9.2"
"base" NA
Contains Depends
base NA NA
boot NA "R (>= 2.7.0), graphics, stats"
class "MASS class nnet spatial" "R (>= 2.5.0), grDevices, graphics,
stats, utils"
cluster NA "R (>= 2.5.0), stats, graphics,
utils"
codetools NA "R (>= 2.1)"
datasets NA NA
foreign NA "R (>= 2.6.0), stats"
graphics NA NA
grDevices NA NA
grid NA NA
KernSmooth NA "R (>= 2.5.0), stats"
lattice NA "R (>= 2.5.0)"
MASS "MASS class nnet spatial" "R (>= 2.5.0), grDevices, graphics,
stats, utils"
Matrix NA "R (>= 2.9.0), stats, methods,
utils, lattice"
methods NA NA
mgcv NA "R (>= 2.3.0)"
nlme NA "graphics, stats, R (>= 2.4.0)"
nnet "MASS class nnet spatial" "R (>= 2.5.0), grDevices, graphics,
stats, utils"
rpart NA "R (>= 2.7.0), graphics, stats,
grDevices"
spatial "MASS class nnet spatial" "R (>= 2.5.0), grDevices, graphics,
stats, utils"
splines NA NA
stats NA NA
stats4 NA "methods, graphics, stats"
survival NA "stats, utils, graphics, splines, R
(>= 2.0.0)"
tcltk NA NA
tools NA NA
utils NA NA
Imports Suggests
Enhances
base NA NA
NA
boot NA "survival"
NA
class NA "lattice, nlme,
survival" NA
cluster NA NA
NA
codetools NA NA
NA
datasets NA NA
NA
foreign "methods, utils" NA
NA
graphics "grDevices" NA
NA
grDevices NA NA
NA
grid "grDevices" "lattice"
NA
KernSmooth NA "MASS"
NA
lattice "grid, grDevices, graphics, stats, utils" "grid, KernSmooth"
"chron"
MASS NA "lattice, nlme,
survival" NA
Matrix "graphics, lattice, grid, stats" NA
"graph, SparseM"
methods "utils" NA
NA
mgcv "graphics, stats, nlme" "nlme (>= 3.1-64),
splines" NA
nlme "lattice" NA
NA
nnet NA "lattice, nlme,
survival" NA
rpart NA "survival"
NA
spatial NA "lattice, nlme,
survival" NA
splines "graphics, stats" NA
NA
stats NA NA
NA
stats4 NA NA
NA
survival NA NA
NA
tcltk NA NA
NA
tools NA NA
NA
utils NA NA
NA
OS_type Built
base NA "2.9.2"
boot NA "2.9.2"
class NA "2.9.2"
cluster NA "2.9.2"
codetools NA "2.9.2"
datasets NA "2.9.2"
foreign NA "2.9.2"
graphics NA "2.9.2"
grDevices NA "2.9.2"
grid NA "2.9.2"
KernSmooth NA "2.9.2"
lattice NA "2.9.2"
MASS NA "2.9.2"
Matrix NA "2.9.2"
methods NA "2.9.2"
mgcv NA "2.9.2"
nlme NA "2.9.2"
nnet NA "2.9.2"
rpart NA "2.9.2"
spatial NA "2.9.2"
splines NA "2.9.2"
stats NA "2.9.2"
stats4 NA "2.9.2"
survival NA "2.9.2"
tcltk NA "2.9.2"
tools NA "2.9.2"
utils NA "2.9.2"
So it looks like MASS is installed. Do you know a command I can check
it with?
Thanks,
Jason
--
Jason Grout
--
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
URL: http://www.sagemath.org