Ask Your Question
0

R interface on Sage

asked 2017-08-29 16:03:55 +0100

Dianbin gravatar image

Hi, recently I am using the statistics software R. Since R has a reputation of unfriendly user interface, I decide to use the R interface on Sage. I would like to know how to run R on Jupyter notebook and also on Linux Sage.

edit retag flag offensive close merge delete

Comments

IMHO R might have an unfriendly interface but "R through Sage" is even uglier!

vdelecroix gravatar imagevdelecroix ( 2017-08-31 17:54:10 +0100 )edit

Vincent is both right and wrong :

  • R has a command-line interface, because it is first and foremost a language (a stats-oriented version of Scheme, with a "nicer" syntax). Its use is not as immediate as a mousodrome such as Excel...
  • Integrating R in Sage allows to use ONE tool for works needing both symbolic and numerical computations, as happens in applied statistics.
  • It is even better when you use Sagetex or a notebook to comment your work : you get ONE document, guaranteed to be consistent : numerical computation is consistent with math, text is consistent with both...

That feature has saved my sorry ass a not inconsiderable number of times...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2017-09-01 10:01:52 +0100 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-08-29 21:39:12 +0100

eric_g gravatar image

You may have a look at the Interfaces to R section of Sage reference manual.

edit flag offensive delete link more
0

answered 2017-09-01 10:14:56 +0100

Emmanuel Charpentier gravatar image

You can add Sage's R kernel to either Sage's Jupyter notebook or a systemwide Jupyter : follow the installation instructions on The Github site for IRKernel.

Note that you may have to play fast'n loose with some symlinks if you want to install this systemwide (Sage doesn't have the permissions to write on the necessary directories for a systemwide install).

Note also that (starting approx. with Sage 7.6, IIRC), a systemwide Jupyter notebook will have trouble finding the $SAGE_ROOT directory : you may have to define this shell variable...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-08-29 16:03:55 +0100

Seen: 948 times

Last updated: Sep 01 '17