On Thu, 25 Jan 2018, Artur Tarassow wrote:
Please find attached a minimal test case (tested on latest git on
ubuntu
17.10). In this example I just call R via the foreign-block and want to
export some matrix. The error I obtain is
"Error in gretl.export(ma) : could not find function "gretl.export"
External command failed"
Here's a somewhat more minimal version of your test case:
<hansl>
foreign language=R
rm(list=ls(all=T))
ma<-matrix(c(-0.25,0,1.2,0,0,0.5),nr=3,byrow=T)
ma
gretl.export(ma)
end foreign
matrix ma = mread("(a)dotdir/ma.mat")
ma
</hansl>
And this indeed provokes
Error in gretl.export(ma) : could not find function "gretl.export"
Here's why: by doing "rm(list=ls(all=T))" in R you just trashed the
definition of gretl.export.
Allin