Dear Colleagues,
I am having problems running a simple Gretl script to retrieve variables
from the FRED database. The script works perfectly when I run it on a
Mac, but when I run it on my Ubuntu 24.04 it fails on the line:
foreign language=R --send-data
under Ubuntu it generates the following output:
gretl version 2023c
Current session: 2025-10-13 10:15
? foreign language=R --send-data
? print("before loading libraries)
? library(fredr)
? print("loaded fredr)
? library(eFRED)
? print("loaded Fred libraries")
? source("functions/data_management.R")
? print("loaded functions")
? Fd <- Fred_data(gretldata$SLIST)
? Fdata <- Fd[[1]]
? write.csv(Fdata, "temp/FRED_full_from_R.csv", row.names = FALSE)
? end foreign
/home/roland/.gretl/R.msg: No such file or directory
If I create a dummy R.msg then I get the following output:
gretl version 2023c
Current session: 2025-10-13 10:15
? foreign language=R --send-data
? print("before loading libraries)
? library(fredr)
? print("loaded fredr)
? library(eFRED)
? print("loaded Fred libraries")
? source("functions/data_management.R")
? print("loaded functions")
? Fd <- Fred_data(gretldata$SLIST)
? Fdata <- Fd[[1]]
? write.csv(Fdata, "temp/FRED_full_from_R.csv", row.names = FALSE)
? end foreign
4th test
External command failed
If I run the Gretl script on the Mac it retrieves the variables.
I included the print statements for debugging purposes and they seem to
indicate that nothing is executed beyond the foreign language line.
If I run the R script from R on Ubuntu it also works.
The only difference between the Ubuntu and Mac versions is that Ubuntu
uses Gretl 2023c and the Mac uses Gretl 2025c.
Any suggestions would be very welcome.
Thanks,
Roland