Sven,
thank you very much.
I hope my script is of any help.
First, I used the sample matrix provided in the user guide (example 1). And that worked.
I created another test matrix, which contains a tiny excerpt of my data (please see
printed numbers)
I have also changed to R 3.2.4 and also downloaded gretl2016d.
Unfortunately, I still get the error message.
I guess, I see commas, because I run Gretl in German.
### Example 1 - working
matrix r_test={}
r_test=mshape(seq(3,14),4,3)
print r_test
mwrite(r_test,"r_test.mat",1)
foreign language=R --quiet
funds1<-gretl.loadmat("r_test.mat")
gretl.export(funds1,"funds12")
end foreign
####
#### Example 2 - not working
matrix r_test2={}
#r_test2=funds[1:4,1:3]
#print r_test2
#
# nan nan nan
# 0,31643 -0,11822 2,9720
# 0,96456 -0,58746 1,4570
# 0,79388 0,54611 -1,0222
matrix r_test2={}
set skip_missing off
matrix r_test2={NA,0.31643,-0.11822,2.9720 ; NA, 0.96456,-0.58746,1.4570 ; NA,
0.79388,0.54611,-1.0222}
print r_test2
mwrite(r_test2,"r_test2.mat",1)
foreign language=R --quiet
funds2<-gretl.loadmat("r_test2.mat")
gretl.export(funds2,"funds23")
end foreign
funds2 = mread("funds23.mat",1)
Best regards,
Jan
-----Ursprüngliche Nachricht-----
Von: Plus.line MailSystem [mailto:cyrus@mailer.plusline.de] Im Auftrag von Sven Schreiber
Gesendet: Montag, 2. Januar 2017 16:20
An: gretl-users(a)lists.wfu.edu
Betreff: Re: [Gretl-users] Problems when trying to interac with R
Am 02.01.2017 um 16:07 schrieb Jan Tille:
Unfortunately, I still get the same error message. Maybe the error's
source is something else.
I was unable to replicate the problem. Could you post a self-contained example please?
(Your code is incomplete for us because we don't know what the matrix
"funds" is initially. I created it myself but as I said, I don't get the
error.)
BTW, you mentioned a different R version that you have. You just have to change
gretl's settings (paths in the preferences) to use that other installation, I think.
No need to have admin rights for that.
Could you also try a newer gretl version than 2016b?
thanks,
sven
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users