I want to use the prophet package in R from EViews. Exporting data I have problems getting rid of dates.
My EViews code is
smpl 2000 2018
xopen(type=r)
xput(rtype=data.frame, name=df) @strdate("mm/dd/yyyy") a55
xon 'Turn on external R programming mode
names(df)<-c("ds","y")
print(df)
which yield a data frame in R that starts like
ds y
2000Q1 1/1/2000 257.89279
2000Q2 4/1/2000 166.89793
2000Q3 7/1/2000 203.12648
2000Q4 10/1/2000 449.24030
2001Q1 1/1/2001 334.18130
2001Q2 4/1/2001 232.18542
:
The quarter entry first in the ds column (e.g. 2000q1) seems to stick with every EViews object.How can I avoid it or get rid of it?
Export data to R
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Export data to R
From an EViews side, I don't think you can (other than not putting it as a data.frame). Within R you might be able to remove a column from a data.frame.
Follow us on Twitter @IHSEViews
Re: Export data to R
Hi,
"2000Q1" 2000Q2" ... you see in the output from the print command are just the row names of the R-dataframe and not one of the variables generated with the xput command.
Why would the row-names bother you?
A way to removing the row names from the R-data.frame would be inserting
as the 2nd-but last line in your code.
Best, mamo
"2000Q1" 2000Q2" ... you see in the output from the print command are just the row names of the R-dataframe and not one of the variables generated with the xput command.
Why would the row-names bother you?
A way to removing the row names from the R-data.frame would be inserting
Code: Select all
rownames(dfs)<-NULL
as the 2nd-but last line in your code.
Best, mamo
Who is online
Users browsing this forum: No registered users and 22 guests