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 14:54:07 -0600

dhousman gravatar image

updated 2018-05-15 06:57:36 -0600

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 02:02:18 -0600 )edit

I have done as you suggested. Thank you!

dhousman gravatar imagedhousman ( 2018-05-15 06:40:24 -0600 )edit

Link to the corresponding sage-support discussion:

slelievre gravatar imageslelievre ( 2018-06-05 14:53:24 -0600 )edit

The situation might improve after this ticket gets merged:

slelievre gravatar imageslelievre ( 2018-06-05 14:57:09 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-06-05 14:59:36 -0600

slelievre gravatar image

updated 2018-07-10 08:25:26 -0600

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 14:54:07 -0600

Seen: 95 times

Last updated: Jul 10