installing R packages

119 views
Skip to first unread message

Fred Gruber

unread,
Feb 15, 2014, 1:54:31 PM2/15/14
to sage-...@googlegroups.com
Hi
Anyone else having problems installing R packages in sagecloud?

I'm unable to install any R package.

If I do:
%r
install.packages('glmnet')
it just get stuck (get the thinking icon) without doing anything.

If I do r.install_packages('glmnet') it gives me the message
Please restart Sage in order to use 'glmnet'.

But pressing the restart button does not do anything. Still it can't
find glmnet when I use library(glmnet)

The same thing happens in the terminal.

Any suggestions?

thanks

Harald Schilly

unread,
Feb 15, 2014, 6:20:38 PM2/15/14
to sage-...@googlegroups.com
On Sat, Feb 15, 2014 at 7:54 PM, Fred Gruber <fgr...@gmail.com> wrote:
> %r
> install.packages('glmnet')
> it just get stuck (get the thinking icon) without doing anything.

I think it asks you an interactive question (where to download from) -
and that's hidden and therefore it's stuck.

> But pressing the restart button does not do anything. Still it can't
> find glmnet when I use library(glmnet)

Have you tried to go to the settings (wrench icon) and restart the
worksheet/project server?

>
> The same thing happens in the terminal.

In the terminal, you have to do
$ sage -R
to make sure to run Sage's "R" and not a globally available R.
Inside the Sage Notebook, Sage's "R" is the one which is running.
(I suggest you to first try to get it running in "sage -R" and once it
works, also in the worksheet)

... and yes, these things aren't pretty, but it's still beta and there
is always an opportunity to improve this ;-)

Harald

William Stein

unread,
Feb 15, 2014, 7:12:48 PM2/15/14
to sage-...@googlegroups.com
Hi,

I've installed glmnet system-wide in R for all projects on all VM's,
and added it to my list for new Sage versions, etc. If you need any
other R packages, let me know. In general, I prefer to make it so
packages people want are just automatically available for everybody,
which makes code sharing between projects easier.

As Harald said, it's conceivable you might need to click "Restart
Project Server" to see the new package, though I doubt it.)

We'll be switching the default Sage to 6.1 soon too, which includes R
version 3.x (instead of 2.x); I'm just waiting on getting IPython to
work for sage-6.1.

-- William
> --
> You received this message because you are subscribed to the Google Groups "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/CAGG4CB55i%3DY%3DWu17FvRR1YqLVKwgM863t40oeT1Q%3DzAsQLKw7g%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Fred Gruber

unread,
Feb 15, 2014, 7:21:11 PM2/15/14
to sage-...@googlegroups.com
thanks
that solved my problem.
this instructions should be on the help somwhere...

Fred Gruber

unread,
Feb 15, 2014, 7:22:06 PM2/15/14
to sage-...@googlegroups.com
great news about sage 6. The whole system is looking really good.

William Stein

unread,
Feb 15, 2014, 7:38:43 PM2/15/14
to sage-...@googlegroups.com
On Sat, Feb 15, 2014 at 4:21 PM, Fred Gruber <fgr...@gmail.com> wrote:
> thanks
> that solved my problem.
> this instructions should be on the help somwhere...

Can you add something here? I think anybody with a github account
can add things (?): https://github.com/sagemath/cloud/wiki/FAQ
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/a712c56d-e711-4d86-a815-4bb562a0578e%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages