Hi support,
Two questions. The first should be easy, second maybe not.
1. Any links to someone actually doing multiple cool basic stats
examples using R from within Sage? I couldn't find any in a quick
Wiki and sagemath.org search, but that doesn't mean they aren't
there. I need this for a demo I'll be giving in a little more than a
week, from the notebook. Plotting e.g. histograms would be even
better, but I think there are some issues with that currently? Keep
in mind I want to do this pretty much natively with R inside Sage,
either using r.command or r evaluation option in the notebook - trying
to keep it simple, just showing the capability.
2. Apparently, Sage still has issues with loading packages, at least
in OS X.
In the documentation we have
EXAMPLES:
sage: r.install_package('Hmisc') #optional
requires internet
[1] 4 5 6
but this is just flat wrong, because it's install_packages()
I did this, and it seemed to work. Though it told me to do r.restart
(), but
sage: r.restart()
Error: object 'sage0' not found
Anyway, next up is the "standard" package that our speaker at the last
JMM couldn't get to load in the Sage version of R, so he just showed
slides instead :(
sage: r.install_packages('MASS')
** You are using OS X. Unfortunately, the R optional package system
currently doesn't support OS X very well. We are working on this. **
<snip>
> options(repos="http://cran.r-project.org/"); install.packages("MASS")
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘MASS’ is not available
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...
Also note that even though r.library() "should" list loaded libraries,
you in fact have to do r("library()"), so that the Sage interface
isn't the same as just r.command; but maybe this is just rpy, of which
I know little.
Thanks for any help!
- kcrisman
--
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