Gamstransfer not available for this version of R

Questions on using the GAMS APIs (Python, .NET, etc.)
Post Reply
herrtris
User
User
Posts: 1
Joined: 1 year ago

Gamstransfer not available for this version of R

Post by herrtris »

Hello :)

I'm trying to run GAMS from the R console. However, when I try to install the pacakge Gamstransfer, I always get the message that it is not availbale for the newest R version:

"Warning in install.packages :
package ‘C:\GAMS\41\apifiles\R\gamstransfer\source\gamstransfer_r.tar.gz’ is not available for this version of R"

I'm using R version 4.2.2
Does Gamstransfer simply not run with this version of R? With which version of R does it run?

Would be great to get some advice for this.

Best,
Tristan
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: Gamstransfer not available for this version of R

Post by abhosekar »

Hi,

Are you trying to use R console under RStudio? If you are, then can you try the same thing separately outside R studio (from command prompt -> R )?


What happens if you try to install the binary package?

install.packages("C:/GAMS/41/apifiles/R/gamstransfer/binary/gamstransfer.zip", type="biinary")
I can confirm that it is supposed to work on R 4.2.2.

If none of the above work,
can you please provide the exact command that you run?
which version of GAMS do you have on your computer? 41.0, 41.1,...41.5?
can you provide the output of sessionInfo() and the output of .libPaths()?

- Atharv
User avatar
dirkse
Moderator
Moderator
Posts: 214
Joined: 7 years ago
Location: Fairfax, VA

Re: Gamstransfer not available for this version of R

Post by dirkse »

I tried this on my Windows 11 machine, and I get gamstransfer installed on R 4.2.2 without a problem. I did this in RStudio:

RStudio 2022.12.0+353 "Elsbeth Geranium" Release (7d165dcfc1b6d300eb247738db2c7076234f6ef0, 2022-12-03) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2022.12.0+353 Chrome/102.0.5005.167 Electron/19.1.3 Safari/537.36

Here's the log of the installation, with sessionInfo() also. This sort of output is helpful to anybody (including you) troubleshooting a problem.

> install.packages("C:\\GAMS\\41.5.0\\apifiles\\R\\gamstransfer\\binary\\gamstransfer.zip")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/sdirk/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from 'pkgs'
package ‘gamstransfer’ successfully unpacked and MD5 sums checked
> sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.2.2 tools_4.2.2


HTH,

-Steve
Post Reply