0

我已经在我的 Windows 上下载了 Yacas。我首先直接从 Rstudio 安装了包 Ryacas,但是没有 yacas 函数可以运行。我后来运行了这个命令并得到了以下错误:

> devtools::install_github("r-cas/ryacas", build_opts = c("--no-resave-data", "--no-manual"))
Downloading GitHub repo r-cas/ryacas@HEAD
√  checking for file 'C:\Users\MyName\AppData\Local\Temp\RtmpEpL65w\remotes58d46bf01207\r-cas-ryacas-ea52235/DESCRIPTION' (684ms)
-  preparing 'Ryacas': (1.4s)
√  checking DESCRIPTION meta-information ... 
-  cleaning src
-  checking for LF line-endings in source and make files and shell scripts (1s)
-  checking for empty or unneeded directories (501ms)
-  building 'Ryacas_1.1.3.9002.tar.gz'
   
Installing package into ‘C:/Users/MyName/Documents/R/win-library/4.1’ as ‘lib’ is unspecified)
* installing *source* package 'Ryacas' ...
ERROR: cannot remove earlier installation, is it in use?
* removing 'C:/Users/MyName/Documents/R/win-library/4.1/Ryacas'
* restoring previous 'C:/Users/MyName/Documents/R/win-library/4.1/Ryacas'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
  problem copying C:\Users\MyName\Documents\R\win-library\4.1\00LOCK-Ryacas\Ryacas\libs\x64\Ryacas.dll to C:\Users\MyName\Documents\R\win-library\4.1\Ryacas\libs\x64\Ryacas.dll: Permission denied
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/Name~1/AppData/Local/Temp/RtmpEpL65w/file58d4192555cc/Ryacas_1.1.3.9002.tar.gz’ had non-zero exit status

我也试过这些:

> system.file(package = "Ryacas", "yacdir") : install.packages('Ryacas')
Installing package into ‘C:/Users/Name/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/4.1/Ryacas_1.1.3.1.zip'
Content type 'application/zip' length 1739652 bytes (1.7 MB)
downloaded 1.7 MB

package ‘Ryacas’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Name\AppData\Local\Temp\RtmpeGHfz9\downloaded_packages
Error in system.file(package = "Ryacas", "yacdir"):install.packages("Ryacas") : 
  argument of length 0


> yacasInstall()
Error in yacasInstall() : could not find function "yacasInstall"


> yacas("n := (10 + 2) * 5")
Error in yacas("n := (10 + 2) * 5") : could not find function "yacas"


> Set(ns, (10 + 2) * 5)
Error in Set(ns, (10 + 2) * 5) : could not find function "Set"

如何运行/安装 ryacas?

更新:

yacas 有两个 R 包。网上的一些参考资料是指旧包。一些旧命令仍然有用,只要确保我们已经下载了旧包。另外,我们不能直接在R界面上使用官方手册上的yacas命令。我们必须做一些类似 yacas("...") 或一些专门针对 R 的 yacas 命令。

4

0 回答 0