Learn R Programming

EviewsR (version 0.1.2)

exec_commands: Execute `EViews` commands from R

Description

Use this function to execute `EViews` commands from R

Usage

exec_commands(commands="",wf="",page="")

Value

An EViews workfile

Arguments

commands

Object or a vector of character strings of `EViews` commands

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

See Also

Other important functions: EviewsR, create_object(), eng_eviews(), eviews_graph(), eviews_import(), eviews_pagesave(), eviews_wfcreate(), eviews_wfsave(), export(), import_table(), import(), rwalk(), set_eviews_path()

Examples

Run this code
library(EviewsR)
if (FALSE) {
# 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=EviewsR_exec_commands,page=Page) m 2000 2022",
"save EviewsR_exec_commands","exit"))


# 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=r'(genr y=rnd
genr x=rnd
equation ols.ls y c x
freeze(EviewsROLS,mode=overwrite) ols)'

exec_commands(commands=eviewsCommands,wf="EviewsR_exec_commands")

# unlink("EviewsR_exec_commands.wf1")


}

Run the code above in your browser using DataLab