Thanks Claudio and Allin.
Regards,
Leandro
2012/5/23 Allin Cottrell <cottrell(a)wfu.edu>
On Wed, 23 May 2012, Leandro Zipitria wrote:
> I have atempted to save several databases used in gretl and then open
them
> on R, and have always problems to open it. I attach gretl file, and R
file.
> Does anyone have the same problem? Here is the R output (translated from
> spanish)
>
> ] ERROR: magic number invalid restore file (the file may be corrupted) -
no
> data reloaded
It looks as if you're trying to get R to read a data file as
if it were a saved workspace. In R, you need to do something
like
mydata <- read.table("filename", header=TRUE)
However, the example you gave exposed a bug in gretl's routine
for writing R data. Your "agua2" file contains
observation-marker strings, and gretl writes these into the
R datafile. In itself that's not a problem, since R can handle
"row.names". But... for R, row names have to be unique, and in
agua2.gdt the names (which represent dates in a stacked time
series) repeat, so R bombs out with
"duplicate 'row.names' are not allowed"
This is now fixed in CVS -- we check that the obs strings are
unique before writing them into a R datafile -- and this fix
will be in the gretl snapshot soon.
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users