R:使Ryacas软件包在Windows上无法正常工作 [英] R: trouble making package Ryacas to work on Windows

查看:92
本文介绍了R:使Ryacas软件包在Windows上无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在R中使用软件包Ryacas.这是怎么回事:

I am trying to use the package Ryacas in R. Here what is going on:

> install.packages("Ryacas")
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://www.stats.bris.ac.uk/R/bin/windows/contrib/2.14/Ryacas_0.2-11.zip'
Content type 'application/zip' length 263424 bytes (257 Kb)
opened URL
downloaded 257 Kb

package ‘Ryacas’ successfully unpacked and MD5 sums checked

The downloaded packages are in
    C:\Documents and Settings\yogcal\Local Settings\Temp\RtmpKeuu7m\downloaded_packages

然后我尝试加载Ryacas:

> library(Ryacas)
Loading required package: XML
C:\Program Files\R\R-2.14.1\library\Ryacas\yacdir\yacas.exe 
   or C:\Program Files\R\R-2.14.1\library\Ryacas\yacdir\scripts.dat 
 not found.
Run yacasInstall() without arguments to install yacas.

然后我运行yacasInstall():

> yacasInstall()
trying URL 'http://ryacas.googlecode.com/files/yacas-1.0.63.zip'
Content type 'application/x-zip' length 746009 bytes (728 Kb)
opened URL
downloaded 728 Kb

然后,当我尝试一个示例时:

And then when I try an example:

> library(Ryacas)
> yacas("TeXForm(3 * x^2/(2 * (x + 1)) - (x^3) * 2/(2 * (x + 1))^2)", 
+  retclass = "unquote")
[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
> 

这是怎么回事?

非常感谢...

推荐答案

将问题归零的一种方法是确保端口处于打开状态:

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

1)单击Windows Start

1) Click Windows Start

2)单击All Programs

3)单击Accessories

4)单击Command Prompt打开DOS窗口

4) Click Command Prompt to open a DOS window

5)键入cd C:\Program Files\yacas\winrel

6)通过输入yacas --server 9734

7)Yacas应该给您以下反馈Accepting requests from port 9734

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

如果一切正常,那么yacas可以运行并且可以通话了.现在,您可以运行您的R代码.如果它不起作用,则说明yacas有问题.

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.

这篇关于R:使Ryacas软件包在Windows上无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆