Ask Your Question
1

How can I get R graphics to work with the Windows binary install of Sage 8.2?

asked 2018-05-14 21:54:07 +0200

dhousman gravatar image

updated 2018-05-15 13:57:36 +0200

I installed Sage 8.2 with the Windows binary. In a Sage notebook, I executed the following commands:

data = [2, 3, 7, 8, 10, 11]
print median(data)
print r.quantile(data,.5)
r.boxplot(data)

This works in SageMathCell (lines 2 and 3 returning 15/2 and line 4 returning an object that includes a displayed boxplot); however, in Sage 8.2 Notebook on my Windows machine, line 4 returns [1] 2, and the command

r.png()

returns a Python traceback that includes "...\SageMath-8.2.exe is not a valid Win32 application."

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-5d43610b342f> in <module>()
----> 1 r.png()

/opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/interfaces/r.py in png(self, *args, **kwds)
    445         t = r.eval('capabilities("aqua")')
    446         if "TRUE" not in s+t:
--> 447             raise RuntimeError("R was not compiled with PNG support")
    448 
    449         from sage.server.support import EMBEDDED_MODE

RuntimeError: R was not compiled with PNG support

When I searched on various words, I kept coming upon information from about 6-8 years ago dealing with different headers in the compile phase and the presence or absence of an X11 server. Do I really need to install an X11 server, download the SageMath source, make a variety of compiler choices, and compile myself?

edit retag flag offensive close merge delete

Comments

May I suggest to report this problem (which seems a bug, indeed) in sage-support ? This would help putting your problem to the attention od Sage developers.

Copying the traceback (cut'n paste...) to a file attached to your message may also be useful.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2018-05-15 09:02:18 +0200 )edit

I have done as you suggested. Thank you!

dhousman gravatar imagedhousman ( 2018-05-15 13:40:24 +0200 )edit

Link to the corresponding sage-support discussion:

slelievre gravatar imageslelievre ( 2018-06-05 21:53:24 +0200 )edit

The situation might improve after this ticket gets merged:

slelievre gravatar imageslelievre ( 2018-06-05 21:57:09 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-06-05 21:59:36 +0200

slelievre gravatar image

updated 2018-07-10 15:25:26 +0200

Unless you specifically need to mix features of Sage and R, you might be better off installing R separately.

In the future, Sage will be able to work with an independent R installation. See

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

1 follower

Stats

Asked: 2018-05-14 21:54:07 +0200

Seen: 347 times

Last updated: Jul 10 '18