Page 1 of 1

Saving data in R

Posted: Thu May 04, 2023 1:38 pm
by startz
It would be nice if there were an option when saving to R to have the saved series be accompanied by a date (POSIX) series rather than having row names attached and each series being a dataframe. All the series could then go into one dataframe.

Re: Saving data in R

Posted: Fri May 05, 2023 1:34 pm
by EViews Steve
I think our original idea was to save it this way, but after we added the ability to save matrices and other objects which wouldn't fit into a single dataframe, we had to do it the current way where each object is saved one item at a time.

Here's a quick workaround EViews program that can save a workfile page series objects the way you want it (including a separate @date column in the dataframe):

Code: Select all

xopen(r) %list = @wlookup("*", "series") xput(rtype=df, name=test) {%list} @date xrun save.image("c:/files/out.rdata") xclose
then if you open this rdata file in R, you'd see something like this:
2023-05-05_13h29_43.png
2023-05-05_13h29_43.png (7.63 KiB) Viewed 50757 times

Re: Saving data in R

Posted: Sat May 06, 2023 11:07 am
by startz
That's very helpful. Thanks.

But you could still have two different R save functions...