1

I have read the info in R: trouble making package Ryacas to work on Windows . I installed the yacas executable and can run it directly by double-clicking the yacas.exe icon. However, if I try to get any help, e.g. "??" I get the error message "lynx is not recognized as an internal / external command..." . If I try to run from a cygwin bash session, % ./yacas.exe , the startup message is echoed to the terminal window, a popup window tells me "invalid handle", and yacas exits. And, finally, in R, Ryacas("some_command") fails with the message

"[1] "Starting Yacas!"
Error in socketConnection(host = "127.0.0.1", port = 9734, server = FALSE,  : 
  cannot open the connection
In addition: Warning message:
In socketConnection(host = "127.0.0.1", port = 9734, server = FALSE,  :
  127.0.0.1:9734 cannot be opened"

I tracked down some instructions on opening ports in Windows 7, and tried adding both inbound and outbound rules to enable port 9734, using the "Windows Firewall" manager under ControlPanels. So far as I can tell, the new rules were accepted, but R still returns that error message.
Am I setting up the Firewall rules correctly? I've tried specifying connection types "any", "TCP" and "UDP", and in addition creating rules aimed at yacas.exe (rather than port numbers). (Is it possible that the corporate admin rules are overriding my config without reporting such conflicts to me? I know relatively little about the guts of Win7 admin)

To summarize: what else can I try to get the local server/port to work? I don't know if this helps ID the problem, but standard HTML help under R does work, e.g. opens up a web page like http://127.0.0.1:24932/library/base/html/Trig.html

One more thing, in R,

yacasFile()
[1] "C:\\Program Files\\R\\R-2.15.2\\library\\Ryacas\\yacdir\\yacas.exe"

So at least R is looking in the right place.

Community
  • 1
  • 1
Carl Witthoft
  • 20,573
  • 9
  • 43
  • 73
  • @G.Grothendieck firewall, so can't use `install.packages` - but I will try manually building my non-global R/library. Thanks. – Carl Witthoft Feb 08 '13 at 16:09
  • @G.Grothendieck I'm going to push back here. I re-ran the Windows installer for R, and then selected "install packages from local zip files" . I get no opportunity to choose a different library location. Then, there's this line in the standard install .Rprofile `.Library.site <- file.path(chartr("\\", "/", R.home()), "site-library") `. `R.home()` is the path to the ProgramFiles directory. Are you certain that all these released defaults are the wrong thing to do? – Carl Witthoft Feb 08 '13 at 16:36
  • @G.Grothendieck That worked. Amazing (`~/Documents/R...`) . Thank you. Do you want to post that as an answer, or should I post and steal your creds? :-) – Carl Witthoft Feb 08 '13 at 17:29

1 Answers1

1

This is being transferred from the comments. See advice about putting Ryacas in a personal library and not in the C:\Program Files tree in the Ryacas Windows installation section of the home page.

G. Grothendieck
  • 254,981
  • 17
  • 203
  • 341