Title: | A Seamless Integration of 'EViews' and R |
---|---|
Description: | It allows running 'EViews' (<https://eviews.com>) program from R, R Markdown and Quarto documents. 'EViews' (Econometric Views) is a statistical software for Econometric analysis. This package integrates 'EViews' and R and also serves as an 'EViews' Knit-Engine for 'knitr' package. Write all your 'EViews' commands in R, R Markdown or Quarto documents. For details, please consult our peer-review article Mati S., Civcir I. and Abba S.I (2023) <doi:10.32614/RJ-2023-045>. |
Authors: | Sagiru Mati [aut, cre] |
Maintainer: | Sagiru Mati <[email protected]> |
License: | GPL |
Version: | 0.1.6 |
Built: | 2025-01-20 03:40:34 UTC |
Source: | https://github.com/sagirumati/eviewsr |
It allows running 'EViews' (https://eviews.com) program from R, R Markdown and Quarto documents. 'EViews' (Econometric Views) is a statistical software for Econometric analysis. This package integrates 'EViews' and R and also serves as an 'EViews' Knit-Engine for 'knitr' package. Write all your 'EViews' commands in R, R Markdown or Quarto documents. For details, please consult our peer-review article Mati S., Civcir I. and Abba S.I (2023) doi:10.32614/RJ-2023-045.
Maintainer: Sagiru Mati [email protected] (ORCID)
Useful links:
Report bugs at https://github.com/sagirumati/EviewsR/issues
Other important functions:
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
EViews
object on an existing workfileUse this function in R, R Markdown or Quarto to create an EViews
object on an existing workfile.
create_object( wf = "", page = "", action = "", action_opt = "", object_name = "", view_or_proc = "", options_list = "", arg_list = "", object_type = "", options = "", expression = "" )
create_object( wf = "", page = "", action = "", action_opt = "", object_name = "", view_or_proc = "", options_list = "", arg_list = "", object_type = "", options = "", expression = "" )
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
action |
Any valid |
action_opt |
An option that modifies the default behaviour of the |
object_name |
The name of the |
view_or_proc |
The |
options_list |
An option that modifies the default behaviour of the |
arg_list |
A list of |
object_type |
EViews object type such as |
options |
Options for the |
expression |
Value to be assigned to the object |
An EViews workfile
Other important functions:
EviewsR-package
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) create_object(wf="exec_commands",action="equation", object_name="create_object",view_or_proc="ls",arg_list="y ar(1)") create_object(wf="exec_commands",object_name="x1", object_type="series",expression="y^2") ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) create_object(wf="exec_commands",action="equation", object_name="create_object",view_or_proc="ls",arg_list="y ar(1)") create_object(wf="exec_commands",object_name="x1", object_type="series",expression="y^2") ## End(Not run)
This package runs on top of knitr to facilitate communication with EViews. Run EViews scripts from R Markdown document.
eng_eviews(options)
eng_eviews(options)
options |
Chunk options, as provided by |
The EViews
engine can be activated via
knitr::knit_engines$set(eviews = EviewsR::eng_eviews)
This will be set within an R Markdown document's setup chunk.
Set of EViews
codes
Sagiru Mati, ORCID: 0000-0003-1413-3974, https://smati.com.ng
Yusuf Maitama Sule (Northwest) University Kano, Nigeria
SMATI Academy
Mati, Sagiru. 2020a. “DynareR: Bringing the Power of Dynare to R, R Markdown, and Quarto.” CRAN. https://CRAN.R-project.org/package=DynareR.
Mati, Sagiru. 2020b. EviewsR: A Seamless Integration of EViews and R. https://CRAN.R-project.org/package=EviewsR.
Mati, Sagiru. 2020c. gretlR: A Seamless Integration of Gretl and R. https://CRAN.R-project.org/package=gretlR.
Mati, Sagiru. 2023b. URooTab: Tabular Reporting of EViews Unit Root Tests. https://CRAN.R-project.org/package=URooTab.
Mati, Sagiru, Irfan Civcir, and S. I. Abba. 2023. “EviewsR: An r Package for Dynamic and Reproducible Research Using EViews, r, r Markdown and Quarto.” The R Journal 15 (2): 169–205. https://doi.org/10.32614/rj-2023-045.
Bob Rudis (2015).Running Go language chunks in R Markdown (Rmd) files. Available at: https://gist.github.com/hrbrmstr/9accf90e63d852337cb7
Yihui Xie (2019). knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.24.
Yihui Xie (2015) Dynamic Documents with R and knitr. 2nd edition. Chapman and Hall/CRC. ISBN 978-1498716963
Yihui Xie (2014) knitr: A Comprehensive Tool for Reproducible Research in R. In Victoria Stodden, Friedrich Leisch and Roger D. Peng, editors, Implementing Reproducible Computational Research. Chapman and Hall/CRC. ISBN 978-1466561595 #insertAllCited
Other important functions:
EviewsR-package
,
create_object()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
knitr::knit_engines$set(eviews = EviewsR::eng_eviews) library(EviewsR)
knitr::knit_engines$set(eviews = EviewsR::eng_eviews) library(EviewsR)
EViews
graph in R, R Markdown and Quarto.Use this function to create an EViews
graph in R and R Markdown
eviews_graph( wf = "", page = "*", series = "*", group = FALSE, graph_command = "line", graph_options = "", mode = "overwrite", graph_procs = "", datelabel = "", save_options = "", save_path = "", frequency = "m", start_date = "", save_copy = TRUE )
eviews_graph( wf = "", page = "*", series = "*", group = FALSE, graph_command = "line", graph_options = "", mode = "overwrite", graph_procs = "", datelabel = "", save_options = "", save_path = "", frequency = "m", start_date = "", save_copy = TRUE )
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
series |
A vector of names or wildcard expressions for series object(s) contained in an |
group |
Logical, whether to use group view in EViews, that is merge two or more graphs on one page. Setting |
graph_command |
Object or a character string of any of the acceptable |
graph_options |
Object or a character string of any of the acceptable |
mode |
Set |
graph_procs |
A vector containing |
datelabel |
A vector containing |
save_options |
A vector of options to be passed to |
save_path |
Object or a character string representing the path to the folder to save the |
frequency |
Object or a character string representing the frequency of a workfile page to be created. Only letters accepted by EViews are allowed. For example |
start_date |
Object or a character string representing the |
save_copy |
Logical. Whether to save the copy of the graph objects. |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) eviews_graph(wf="exec_commands",page = "eviewspage1",series="x y",mode = "overwrite", graph_options = "m") # Create graph(s) from dataframe Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) eviews_graph(series=Data,start_date=1990,frequency="m") # Create graphs in one frame (group=TRUE) eviews_graph(series=Data,group=TRUE,start_date="1990Q4",frequency="Q") ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) eviews_graph(wf="exec_commands",page = "eviewspage1",series="x y",mode = "overwrite", graph_options = "m") # Create graph(s) from dataframe Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) eviews_graph(series=Data,start_date=1990,frequency="m") # Create graphs in one frame (group=TRUE) eviews_graph(series=Data,group=TRUE,start_date="1990Q4",frequency="Q") ## End(Not run)
EViews
workfileUse this function in R, R Markdown and Quarto to import data to EViews
workfile.
eviews_import( source_description = "", wf = "", type = "", options = "resize", smpl_string = "@all", genr_string = "", rename_string = "", frequency = "", start_date = "", id = "", destid = "", append = FALSE, save_path = "" )
eviews_import( source_description = "", wf = "", type = "", options = "resize", smpl_string = "@all", genr_string = "", rename_string = "", frequency = "", start_date = "", id = "", destid = "", append = FALSE, save_path = "" )
source_description |
Description of the file from which the data is to be imported. The specification of the description is usually just the path and file name of the file. |
wf |
Object or a character string representing the name of an |
type |
Optional. Specify the file type, it can values allowed by |
options |
Optional.Specify the |
smpl_string |
Optional. Specify the sample to be used for the data import. |
genr_string |
Optional. Any valid |
rename_string |
Optional. Pairs of old object names followed by the new name to be used to rename some of the imported series. |
frequency |
Object or a character string representing the frequency of a workfile page to be created. Only letters accepted by EViews are allowed. For example |
start_date |
Object or a character string representing the |
id |
Name of |
destid |
Name of the destination ID. Required for |
append |
Logical, whether to append to the bottom of the |
save_path |
Specify the path to save the |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) write.csv(Data,"eviews_import.csv",row.names = FALSE) eviews_import(source_description = "eviews_import.csv",start_date = "1990",frequency = "m", rename_string = "x ab",smpl_string = "1990m10 1992m10") # Alternatively, use the dataframe as the source_description eviews_import(source_description = Data,wf="eviews_import1",start_date = "1990", frequency = "m",rename_string = "x ab",smpl_string = "1990m10 1992m10") ## End(Not run)
library(EviewsR) ## Not run: Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) write.csv(Data,"eviews_import.csv",row.names = FALSE) eviews_import(source_description = "eviews_import.csv",start_date = "1990",frequency = "m", rename_string = "x ab",smpl_string = "1990m10 1992m10") # Alternatively, use the dataframe as the source_description eviews_import(source_description = Data,wf="eviews_import1",start_date = "1990", frequency = "m",rename_string = "x ab",smpl_string = "1990m10 1992m10") ## End(Not run)
EViews
workfile page.Use this function in R, R Markdown and Quarto to save an EViews
workfile page.
eviews_pagesave( wf = "", page = "", options = "", source_description = "", table_description = "", keep_list = "", drop_list = "", keepmap_list = "", dropmap_list = "", smpl_spec = "", save_path = dirname(source_description) )
eviews_pagesave( wf = "", page = "", options = "", source_description = "", table_description = "", keep_list = "", drop_list = "", keepmap_list = "", dropmap_list = "", smpl_spec = "", save_path = dirname(source_description) )
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
options |
Object or a character string of any of the acceptable |
source_description |
The path and name of the file to be saved. |
table_description |
Further description of the |
keep_list |
Optional. Specify the list of |
drop_list |
Optional. Specify the list of |
keepmap_list |
Optional. Specify the list of patterns of |
dropmap_list |
Optional. Specify the list of patterns of |
smpl_spec |
Optional. Specify the |
save_path |
Object or a character string representing the path to the folder to save the |
An EViews workfile.
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) eviews_pagesave(wf="exec_commands",source_description = "eviews_pagesave.csv", drop_list = "y") ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) eviews_pagesave(wf="exec_commands",source_description = "eviews_pagesave.csv", drop_list = "y") ## End(Not run)
EViews
workfile.Use this function in R, R Markdown and Quarto to create an EViews
workfile.
eviews_wfcreate( source_description = "", wf = "", page = "", prompt = FALSE, frequency = "", subperiod_opts = "", start_date = "", end_date = "", num_cross_sections = NA, num_observations = NA, save_path = "" )
eviews_wfcreate( source_description = "", wf = "", page = "", prompt = FALSE, frequency = "", subperiod_opts = "", start_date = "", end_date = "", num_cross_sections = NA, num_observations = NA, save_path = "" )
source_description |
Description of the file from which the data is to be imported. The specification of the description is usually just the path and file name of the file. |
wf |
Object or a character string representing the name of a workfile to be created |
page |
Object or a character string representing the name of a workfile page to be created |
prompt |
Logical, whether to force the dialog to appear from within an |
frequency |
Object or a character string representing the frequency of a workfile page to be created. Only letters accepted by EViews are allowed. For example |
subperiod_opts |
Optional integer value. Include |
start_date |
Object or a character string representing the |
end_date |
Object or a character string representing the |
num_cross_sections |
Optional integer value. Include |
num_observations |
Numeric value. Specify the number of observations if the |
save_path |
Specify where to save the |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: eviews_wfcreate(wf="eviews_wfcreate",page="EviewsR_page",frequency = "m", start_date = "1990",end_date = "2022") # Create a workfile from a dataframe Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) eviews_wfcreate(source_description=Data,wf="eviews_wfcreate1",page="EviewsR_page",frequency="m", start_date="1990") ## End(Not run)
library(EviewsR) ## Not run: eviews_wfcreate(wf="eviews_wfcreate",page="EviewsR_page",frequency = "m", start_date = "1990",end_date = "2022") # Create a workfile from a dataframe Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) eviews_wfcreate(source_description=Data,wf="eviews_wfcreate1",page="EviewsR_page",frequency="m", start_date="1990") ## End(Not run)
EViews
workfile.Use this function in R, R Markdown and Quarto to save an EViews
workfile.
eviews_wfsave( wf = "", page = "", options = "", source_description = "", table_description = "", keep_list = "", drop_list = "", keepmap_list = "", dropmap_list = "", smpl_spec = "", save_path = dirname(source_description) )
eviews_wfsave( wf = "", page = "", options = "", source_description = "", table_description = "", keep_list = "", drop_list = "", keepmap_list = "", dropmap_list = "", smpl_spec = "", save_path = dirname(source_description) )
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
options |
Object or a character string of any of the acceptable |
source_description |
The path and name of the file to be saved. |
table_description |
Further description of the |
keep_list |
Optional. Specify the list of |
drop_list |
Optional. Specify the list of |
keepmap_list |
Optional. Specify the list of patterns of |
dropmap_list |
Optional. Specify the list of patterns of |
smpl_spec |
Optional. Specify the |
save_path |
Object or a character string representing the path to the folder to save the |
An EViews workfile.
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) eviews_wfsave(wf="exec_commands",source_description = "eviews_wfsave.csv", drop_list = "x") ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) eviews_wfsave(wf="exec_commands",source_description = "eviews_wfsave.csv", drop_list = "x") ## End(Not run)
EViews
commands.Use this function in R, R Markdown and Quarto to execute EViews
commands.
exec_commands(commands = "", wf = "", page = "", save_path = "")
exec_commands(commands = "", wf = "", page = "", save_path = "")
commands |
Object or a vector of character strings of |
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
save_path |
Object or a character string representing the path to the folder to save the |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: # The first example creates an `EViews` workfile with monthly frequency from 1990 2021, # then save the workfile in the current working directory exec_commands(c("wfcreate(wf=exec_commands,page=eviewsPage) m 2000 2022")) # The second example opens the `EViews` workfile and then generate a random series # named `y` and plots its line graph. It also freezes `ols` equation as `EviewsROLS` eviewsCommands='pagecreate(page=eviewspage1) 7 2020 2022 for %page eviewspage eviewspage1 pageselect {%page} genr y=@cumsum(nrnd) genr x=@cumsum(nrnd) equation ols.ls y c x graph x_graph.line x graph y_graph.area y freeze(OLSTable,mode=overwrite) ols next' exec_commands(commands=eviewsCommands,wf="exec_commands") # unlink("exec_commands.wf1") ## End(Not run)
library(EviewsR) ## Not run: # The first example creates an `EViews` workfile with monthly frequency from 1990 2021, # then save the workfile in the current working directory exec_commands(c("wfcreate(wf=exec_commands,page=eviewsPage) m 2000 2022")) # The second example opens the `EViews` workfile and then generate a random series # named `y` and plots its line graph. It also freezes `ols` equation as `EviewsROLS` eviewsCommands='pagecreate(page=eviewspage1) 7 2020 2022 for %page eviewspage eviewspage1 pageselect {%page} genr y=@cumsum(nrnd) genr x=@cumsum(nrnd) equation ols.ls y c x graph x_graph.line x graph y_graph.area y freeze(OLSTable,mode=overwrite) ols next' exec_commands(commands=eviewsCommands,wf="exec_commands") # unlink("exec_commands.wf1") ## End(Not run)
EViews
workfileUse this function to export R dataframe as an EViews
workfile
export( source_description = "", wf = "", start_date = "", frequency = "", save_path = "" )
export( source_description = "", wf = "", start_date = "", frequency = "", save_path = "" )
source_description |
Description of the file from which the data is to be imported. The specification of the description is usually just the path and file name of the file. |
wf |
Object or a character string representing the name of a workfile to be created |
start_date |
Object or a character string representing the |
frequency |
Object or a character string representing the frequency of a workfile page to be created. Only letters accepted by EViews are allowed. For example |
save_path |
Specify where to save the |
An EViews workfile.
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) export(wf="export",source_description=Data,start_date = '1990',frequency = "m") ## End(Not run)
library(EviewsR) ## Not run: Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) export(wf="export",source_description=Data,start_date = '1990',frequency = "m") ## End(Not run)
EViews
workfileUse this function in R, R Markdown and Quarto to export an R dataframe as an EViews
workfile
export_dataframe( source_description = "", wf = "", start_date = "", frequency = "", save_path = "" )
export_dataframe( source_description = "", wf = "", start_date = "", frequency = "", save_path = "" )
source_description |
Description of the file from which the data is to be imported. The specification of the description is usually just the path and file name of the file. |
wf |
Object or a character string representing the name of a workfile to be created |
start_date |
Object or a character string representing the |
frequency |
Object or a character string representing the frequency of a workfile page to be created. Only letters accepted by EViews are allowed. For example |
save_path |
Specify where to save the |
An EViews workfile.
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) export_dataframe(wf="export_dataframe",source_description=Data,start_date = '1990',frequency = "m") ## End(Not run)
library(EviewsR) ## Not run: Data=data.frame(x=cumsum(rnorm(100)),y=cumsum(rnorm(100))) export_dataframe(wf="export_dataframe",source_description=Data,start_date = '1990',frequency = "m") ## End(Not run)
EViews
series objects as dataframeUse this function to import EViews
series objects to R, R Markdown and Quarto as dataframe
import( object_name = "", wf = "", page = "", options = "", source_description = "", table_description = "", keep_list = "", drop_list = "", keepmap_list = "", dropmap_list = "", smpl_spec = "" )
import( object_name = "", wf = "", page = "", options = "", source_description = "", table_description = "", keep_list = "", drop_list = "", keepmap_list = "", dropmap_list = "", smpl_spec = "" )
object_name |
Object name to be to store the imported |
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
options |
Object or a character string of any of the acceptable |
source_description |
The path and name of the file to be saved. |
table_description |
Further description of the |
keep_list |
Optional. Specify the list of |
drop_list |
Optional. Specify the list of |
keepmap_list |
Optional. Specify the list of patterns of |
dropmap_list |
Optional. Specify the list of patterns of |
smpl_spec |
Optional. Specify the |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) import(object_name="importedDataFrame",wf="EviewsR_exec_commands",drop_list = "y") eviews$importedDataFrame knitr::kable(head(eviews$importedDataFrame),format="pandoc",caption="Table from EviewsR") ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) import(object_name="importedDataFrame",wf="EviewsR_exec_commands",drop_list = "y") eviews$importedDataFrame knitr::kable(head(eviews$importedDataFrame),format="pandoc",caption="Table from EviewsR") ## End(Not run)
EViews
equation data members into R, R Markdown or Quarto.Use this function to import EViews
equation data members into R, R Markdown or Quarto.
import_equation(wf = "", page = "*", equation = "*")
import_equation(wf = "", page = "*", equation = "*")
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
equation |
Name(s) or wildcard expressions for |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) import_equation(wf="exec_commands",page="eviewsPage",equation="OLS") # To access the data members in base R eviews$eviewspage_ols # To obtain R-squared value in base R eviews$eviewspage_ols$r2 # To get the values above in R Markdown or Quarto: # chunkLabel$eviewspage_ols # chunkLabel$eviewspage_ols$r2 ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) import_equation(wf="exec_commands",page="eviewsPage",equation="OLS") # To access the data members in base R eviews$eviewspage_ols # To obtain R-squared value in base R eviews$eviewspage_ols$r2 # To get the values above in R Markdown or Quarto: # chunkLabel$eviewspage_ols # chunkLabel$eviewspage_ols$r2 ## End(Not run)
EViews
graph objects(s) into R, R Markdown or Quarto.Use this function to import EViews
graph objects(s) into R, R Markdown or Quarto.
import_graph( wf = "", page = "*", graph = "*", graph_procs = "", save_options = "", save_copy = T, save_path = dirname(wf) )
import_graph( wf = "", page = "*", graph = "*", graph_procs = "", save_options = "", save_copy = T, save_path = dirname(wf) )
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
graph |
Name(s) or wildcard expressions of EViews graph object(S) |
graph_procs |
A vector containing |
save_options |
A vector of options to be passed to |
save_copy |
Logical. Whether to save the copy of the graph objects |
save_path |
Object or a character string representing the path to the folder to save the |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) # To import all graph objects import_graph(wf="exec_commands") # To import only graphs that begin with x: import_graph(wf="exec_commands",graph="x*") # To access the graph objects in base R: # eviewspage-x_graph # graph saved in "figure/" folder # To get the graph objects in R Markdown or Quarto # chunkLabel-eviewspage-x_graph # graph saved in "fig.path" folder ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) # To import all graph objects import_graph(wf="exec_commands") # To import only graphs that begin with x: import_graph(wf="exec_commands",graph="x*") # To access the graph objects in base R: # eviewspage-x_graph # graph saved in "figure/" folder # To get the graph objects in R Markdown or Quarto # chunkLabel-eviewspage-x_graph # graph saved in "fig.path" folder ## End(Not run)
EViews
table object as kable
Use this function to import EViews
table object as kable
import_kable( wf = "", page = "", table = "", range = "", format = kable_format(), digits = getOption("digits"), row.names = NA, col.names = NA, align, caption = NULL, label = NULL, format.args = list(), escape = FALSE, table.attr = "", booktabs = TRUE, longtable = FALSE, valign = "t", position = "h", centering = TRUE, vline = getOption("knitr.table.vline", if (booktabs) "" else "|"), toprule = getOption("knitr.table.toprule", if (booktabs) "\\toprule" else "\\hline"), bottomrule = getOption("knitr.table.bottomrule", if (booktabs) "\\bottomrule" else "\\hline"), midrule = getOption("knitr.table.midrule", if (booktabs) "\\midrule" else "\\hline"), linesep = if (booktabs) c("", "", "", "", "\\addlinespace") else "\\hline", caption.short = "", table.envir = if (!is.null(caption)) "table", ... )
import_kable( wf = "", page = "", table = "", range = "", format = kable_format(), digits = getOption("digits"), row.names = NA, col.names = NA, align, caption = NULL, label = NULL, format.args = list(), escape = FALSE, table.attr = "", booktabs = TRUE, longtable = FALSE, valign = "t", position = "h", centering = TRUE, vline = getOption("knitr.table.vline", if (booktabs) "" else "|"), toprule = getOption("knitr.table.toprule", if (booktabs) "\\toprule" else "\\hline"), bottomrule = getOption("knitr.table.bottomrule", if (booktabs) "\\bottomrule" else "\\hline"), midrule = getOption("knitr.table.midrule", if (booktabs) "\\midrule" else "\\hline"), linesep = if (booktabs) c("", "", "", "", "\\addlinespace") else "\\hline", caption.short = "", table.envir = if (!is.null(caption)) "table", ... )
wf |
Object or a character string representing the name of a workfile to be created |
page |
Object or a character string representing the name of a workfile page to be created |
table |
Name of an |
range |
A vector of characters specifying the table range of rows and columns |
format |
A character string. Possible values are |
digits |
Maximum number of digits for numeric columns, passed to
|
row.names |
Logical: whether to include row names. By default, row names
are included if |
col.names |
A character vector of column names to be used in the table. |
align |
Column alignment: a character vector consisting of |
caption |
The table caption. By default, it is retrieved from the chunk
option |
label |
The table reference label. By default, the label is obtained
from |
format.args |
A list of arguments to be passed to |
escape |
Boolean; whether to escape special characters when producing
HTML or LaTeX tables. When |
table.attr |
A character string for addition HTML table attributes. This is convenient if you simply want to add a few HTML classes or styles. For example, you can put 'class="table" style="color: red"'. |
booktabs |
T/F for whether to enable the booktabs format for tables. I personally would recommend you turn this on for every latex table except some special cases. |
longtable |
T/F for whether to use the longtable format. If you have a table that will span over two or more pages, you will have to turn this on. |
valign |
You probably won't need to adjust this latex option very often.
If you are familiar with latex tables, this is the optional position for the
tabular environment controlling the vertical position of the table relative
to the baseline of the surrounding text. Possible choices are |
position |
This is the "real" or say floating position for the latex
table environment. The |
centering |
T (default)/F. Whether to center tables in the table environment. |
vline |
vertical separator. Default is nothing for booktabs tables but "|" for normal tables. |
toprule |
toprule. Default is hline for normal table but toprule for booktabs tables. |
bottomrule |
bottomrule. Default is hline for normal table but bottomrule for booktabs tables. |
midrule |
midrule. Default is hline for normal table but midrule for booktabs tables. |
linesep |
By default, in booktabs tables, |
caption.short |
Another latex feature. Short captions for tables |
table.envir |
You probably don't need to change this as well. The default setting is to put a table environment outside of tabular if a caption is provided. |
... |
Other arguments (see Examples and References). |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) # To import the entire table object import_kable(wf="exec_commands",page="eviewspage",table="OLSTable",format="pandoc") # To import certain RANGE of the table object import_kable(wf="exec_commands",page="eviewspage",table="OLSTable",range="r7c1:r10c5", format="pandoc") ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) # To import the entire table object import_kable(wf="exec_commands",page="eviewspage",table="OLSTable",format="pandoc") # To import certain RANGE of the table object import_kable(wf="exec_commands",page="eviewspage",table="OLSTable",range="r7c1:r10c5", format="pandoc") ## End(Not run)
EViews
series objects(s) into R, R Markdown or Quarto.Use this function to import EViews
series objects(s) into R, R Markdown or Quarto as dataframe or xts
object.
import_series(wf = "", page = "*", series = "*", class = "df")
import_series(wf = "", page = "*", series = "*", class = "df")
wf |
Object or a character string representing the name of a workfile to be created |
page |
Object or a character string representing the name of a workfile page to be created |
series |
Name(s) of |
class |
Class of the R object: |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_table()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) # To import all series objects across all pages import_series(wf="exec_commands") # Plot the dataframe object library(ggplot2) ggplot(eviews$eviewspage,aes(x=date))+geom_line(aes(y=x,color="x"))+ geom_line(aes(y=y,color="y"))+labs(colour='',x="",y="") # To import all series objects across all pages, as an `xts` object import_series(wf="exec_commands",class="xts") # Plot the `xts` object autoplot(eviews$eviewspage,facet='')+xlab("") # To import specific series objects, for example starting with Y import_series(wf="exec_commands",series="y*") # To import series objects on specific pages import_series(wf="exec_commands",page="eviewspage") # To access the series in base R eviews$eviewspage %>% head() # To get the values above in R Markdown or Quarto: # chunkLabel$eviewspage ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) # To import all series objects across all pages import_series(wf="exec_commands") # Plot the dataframe object library(ggplot2) ggplot(eviews$eviewspage,aes(x=date))+geom_line(aes(y=x,color="x"))+ geom_line(aes(y=y,color="y"))+labs(colour='',x="",y="") # To import all series objects across all pages, as an `xts` object import_series(wf="exec_commands",class="xts") # Plot the `xts` object autoplot(eviews$eviewspage,facet='')+xlab("") # To import specific series objects, for example starting with Y import_series(wf="exec_commands",series="y*") # To import series objects on specific pages import_series(wf="exec_commands",page="eviewspage") # To access the series in base R eviews$eviewspage %>% head() # To get the values above in R Markdown or Quarto: # chunkLabel$eviewspage ## End(Not run)
EViews
table objects(s) into R, R Markdown or Quarto.Use this function to import EViews
table objects(s) into R, R Markdown or Quarto.
import_table(wf = "", page = "*", table = "*")
import_table(wf = "", page = "*", table = "*")
wf |
Object or a character string representing the name of a workfile to be created |
page |
Object or a character string representing the name of a workfile page to be created |
table |
Name(s) or wildcard expressions for |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_workfile()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) # To import all table objects across all pages import_table(wf="exec_commands") # To import specific table objects, for example for example `OLSTable` import_table(wf="exec_commands",table="OLStable") # To import table objects on specific pages import_table(wf="exec_commands",page="eviewspage") # To access the table in base R eviews$eviewspage_olstable # To get the values above in R Markdown or Quarto # chunkLabel$eviewspage_olstable ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) # To import all table objects across all pages import_table(wf="exec_commands") # To import specific table objects, for example for example `OLSTable` import_table(wf="exec_commands",table="OLStable") # To import table objects on specific pages import_table(wf="exec_commands",page="eviewspage") # To access the table in base R eviews$eviewspage_olstable # To get the values above in R Markdown or Quarto # chunkLabel$eviewspage_olstable ## End(Not run)
EViews
equation data members, graph, series and table objects(s) into R, R Markdown or Quarto.Use this function to import EViews
equation data members, graph, series and table objects(s) into R, R Markdown or Quarto.
import_workfile( wf = "", page = "*", equation = "*", graph = "*", series = "*", table = "*", graph_procs = "", save_options = "", save_path = dirname(wf), save_copy = T, class = "df" )
import_workfile( wf = "", page = "*", equation = "*", graph = "*", series = "*", table = "*", graph_procs = "", save_options = "", save_path = dirname(wf), save_copy = T, class = "df" )
wf |
Object or a character string representing the name of an |
page |
Object or a character string representing the name of an |
equation |
Name(s) or wildcard expressions for |
graph |
Name(s) or wildcard expressions of EViews graph object(S) |
series |
Name(s) of |
table |
Name(s) or wildcard expressions for |
graph_procs |
A vector containing |
save_options |
A vector of options to be passed to |
save_path |
Object or a character string representing the path to the folder to save the |
save_copy |
Logical. Whether to save the copy of the graph objects |
class |
Class of the R object: |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
rwalk()
,
set_eviews_path()
library(EviewsR) ## Not run: demo(exec_commands) # To import all equation, graph, series and table objects across all pages import_workfile(wf="exec_commands") # To import specific objects import_workfile(wf="exec_commands",equation="ols",graph="x*",series="y*",table="ols*") # To import objects on specific page(s) import_workfile(wf="exec_commands",page="eviewspage") # To access the objects in base R eviews$eviewspage_ols # equation # eviewspage-x_graph # graph saved in "figure/" folder eviews$eviewspage %>% head() # series eviews$eviewspage_olstable # table # To get the values above in R Markdown or Quarto: # chunkLabel$eviewspage_ols # equation # chunkLabel-eviewspage-x_graph # graph saved in "fig.path" folder # chunkLabel$eviewspage %>% head() # series # chunkLabel$eviewspage_olstable # table ## End(Not run)
library(EviewsR) ## Not run: demo(exec_commands) # To import all equation, graph, series and table objects across all pages import_workfile(wf="exec_commands") # To import specific objects import_workfile(wf="exec_commands",equation="ols",graph="x*",series="y*",table="ols*") # To import objects on specific page(s) import_workfile(wf="exec_commands",page="eviewspage") # To access the objects in base R eviews$eviewspage_ols # equation # eviewspage-x_graph # graph saved in "figure/" folder eviews$eviewspage %>% head() # series eviews$eviewspage_olstable # table # To get the values above in R Markdown or Quarto: # chunkLabel$eviewspage_ols # equation # chunkLabel-eviewspage-x_graph # graph saved in "fig.path" folder # chunkLabel$eviewspage %>% head() # series # chunkLabel$eviewspage_olstable # table ## End(Not run)
EViews
engine.Use this function to simulate a random walk process using an EViews
engine from R, R Markdown or Quarto.
rwalk( series = "", wf = "", page = "", drift = NA, rndseed = NA, frequency = "", start_date = "", end_date = "", num_cross_sections = NA, num_observations = NA, class = "df" )
rwalk( series = "", wf = "", page = "", drift = NA, rndseed = NA, frequency = "", start_date = "", end_date = "", num_cross_sections = NA, num_observations = NA, class = "df" )
series |
Names of series for the random walk. |
wf |
Object or a character string representing the name of a workfile to be created |
page |
Object or a character string representing the name of a workfile page to be created |
drift |
Numeric value as the drift term for random walk. |
rndseed |
Set the |
frequency |
Object or a character string representing the frequency of a workfile page to be created. Only letters accepted by EViews are allowed. For example |
start_date |
Object or a character string representing the |
end_date |
Object or a character string representing the |
num_cross_sections |
Optional integer value. Include |
num_observations |
Numeric value. Specify the number of observations if the |
class |
Class of the R object: |
An EViews workfile
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
set_eviews_path()
library(EviewsR) ## Not run: # Simulate random walk and return as a dataframe object rwalk(series="a b e",rndseed=12345,start_date = 1990,frequency="m",num_observations=100) library(ggplot2) ggplot(eviews$abe,aes(x=date))+geom_line(aes(y=a,color="a"))+ geom_line(aes(y=b,color="b"))+geom_line(aes(y=e,color="e"))+labs(colour='',x="",y="") # To simulate random walk and return as an `xts` object rwalk(series="X Y Z",rndseed=12345,start_date = 1990,frequency="m",num_observations=100,class="xts") plot(eviews$xyz) autoplot(eviews$xyz,facet="")+xlab("") plot(eviews$XYZ) # To simulate random walk series on existing workfile eviews_wfcreate(wf="rwalk",page="rwalk",frequency="7",start_date=2020,end_date="2022") rwalk(wf="rwalk",series="rw1 rw2 rw3",rndseed=12345,frequency="M") head(eviews$rw1rw2rw3) ## End(Not run)
library(EviewsR) ## Not run: # Simulate random walk and return as a dataframe object rwalk(series="a b e",rndseed=12345,start_date = 1990,frequency="m",num_observations=100) library(ggplot2) ggplot(eviews$abe,aes(x=date))+geom_line(aes(y=a,color="a"))+ geom_line(aes(y=b,color="b"))+geom_line(aes(y=e,color="e"))+labs(colour='',x="",y="") # To simulate random walk and return as an `xts` object rwalk(series="X Y Z",rndseed=12345,start_date = 1990,frequency="m",num_observations=100,class="xts") plot(eviews$xyz) autoplot(eviews$xyz,facet="")+xlab("") plot(eviews$XYZ) # To simulate random walk series on existing workfile eviews_wfcreate(wf="rwalk",page="rwalk",frequency="7",start_date=2020,end_date="2022") rwalk(wf="rwalk",series="rw1 rw2 rw3",rndseed=12345,frequency="M") head(eviews$rw1rw2rw3) ## End(Not run)
EViews
pathUse this function to set EViews
path. It is only useful when the EViews
is not installed in standard directory, or when there are multiple EViews
executables and the user wants to use older version of EViews
.
set_eviews_path(engine_path = "eviews")
set_eviews_path(engine_path = "eviews")
engine_path |
Path to the EViews executable |
Character
Other important functions:
EviewsR-package
,
create_object()
,
eng_eviews()
,
eviews_graph()
,
eviews_import()
,
eviews_pagesave()
,
eviews_wfcreate()
,
eviews_wfsave()
,
exec_commands()
,
export()
,
export_dataframe()
,
import()
,
import_equation()
,
import_graph()
,
import_kable()
,
import_series()
,
import_table()
,
import_workfile()
,
rwalk()
library(EviewsR) ## Not run: set_eviews_path('C:/Program Files (x86)/EViews 10/eviews10.exe') ## End(Not run)
library(EviewsR) ## Not run: set_eviews_path('C:/Program Files (x86)/EViews 10/eviews10.exe') ## End(Not run)