R: trouble making package Ryacas to work on Windows

耗尽温柔 提交于 2019-12-01 07:38:59

Two possibilities: 1) Yacas never got started. (R does not load Yacas for you.) 2) The connection was blocked. Assuming you started Yacas from your operating system, then you need to open up that port using your security admin tools. It's not an R issue but an operating system/firewall issue.

I may be wrong about needing to start Yacas from the Start menu. This is the code for:

runYacas()
### You should not need to type any of what follows. Just use the command above.
runYacas <- function(method = "system", yacas.args = "", yacas.init = "") {
   cmd <- yacasInvokeString(method = method, yacas.args = yacas.args, yacas.init = yacas.init)
   if (.Platform$OS.type == "windows") 
      system(cmd, wait = FALSE, invisible = FALSE)
   else system(cmd, wait = FALSE)
}

Since it seems to call the system, I would try that at your R prompt.

One way to zero-in on the problem is to make sure the port is open:

1) Click Windows Start

2) Click All Programs

3) Click Accessories

4) Click Command Prompt to open a DOS window

5) Change the directory to the directory where yacas.exe is located (probably C:\Program Files\yacas\winrel) by typing cd C:\Program Files\yacas\winrel

6) Start yacas with the server by typing yacas --server 9734

7) Yacas should give you the following feedback Accepting requests from port 9734

If everything works up to this point then yacas is running and ready to talk. Now, you can run your R code. If it doesn't work, then you have a problem with yacas.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!