2022-02-28

unable to install yacas with Rstudio

I already downloaded Yacas on my windows. I first installed package Ryacas directly from Rstudio but no yacas functions can be run. I later ran this command and got the following errors:

> 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

I have also tried these:

> 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"

How to run/install ryacas?

Update:

There are two R packages for yacas. Some references online refer to the old package. Some old commands are still useful just make sure we have downloaded the old package. Also, we cannot use the yacas commands on the official manual directly with R interface. We have to do something like yacas("...") or some yacas commands specifically for R.



No comments:

Post a Comment