Passing Variable to "R"
Posted: Mon Mar 25, 2024 10:54 am
I'm trying to use EViews with R.
My program begins in EViews and asks the user for some information:
- series to forecast in R, called %fcst_series
- start year for forecast, called !start_year
- start month for forecast, called !start_month
- frequency of data, called !frequency
My code then tries to feed these variables into the R code starting with:
xon
fcst_series <- ts({%fcst_series}, start = c({!start_year},{!start_month}), frequency = {!frequency})
However, R doesn't like {%fcst_series} formatting. It appears to reject the "{}" and the "%"...
I can't figure out what the right way is to transfer this information to R.
Any ideas would be greatly appreciated!
Many thanks,
KC
My program begins in EViews and asks the user for some information:
- series to forecast in R, called %fcst_series
- start year for forecast, called !start_year
- start month for forecast, called !start_month
- frequency of data, called !frequency
My code then tries to feed these variables into the R code starting with:
xon
fcst_series <- ts({%fcst_series}, start = c({!start_year},{!start_month}), frequency = {!frequency})
However, R doesn't like {%fcst_series} formatting. It appears to reject the "{}" and the "%"...
I can't figure out what the right way is to transfer this information to R.
Any ideas would be greatly appreciated!
Many thanks,
KC