eviews_graph {EviewsR}R Documentation

Create an EViews graph in R, R Markdown and Quarto.

Description

Use this function to create an EViews graph in R and R Markdown

Usage

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
)

Arguments

wf

Object or a character string representing the name of an EViews workfile.

page

Object or a character string representing the name of an EViews workfile page.

series

A vector of names or wildcard expressions for series object(s) contained in an EViews workfile. An R dataframe is also acceptable.

group

Logical, whether to use group view in EViews, that is merge two or more graphs on one page. Setting group=FALSE produces EViews graph for each series separately.

graph_command

Object or a character string of any of the acceptable EViews graphical commands, such as line, bar, pie.

graph_options

Object or a character string of any of the acceptable EViews graphical options, such as "", m, s.

mode

Set mode="overwrite" to overwrite existing EViews graph objects that match the new EViews graph object to be created on the workfile. Set mode="" to avoid overwriting exising EViews graph object.

graph_procs

A vector containing EViews graph procs such as datelabel, align

datelabel

A vector containing EViews axis label formats such as format("YY"). Using datelabel in graph_procs overwrites this argument.

save_options

A vector of options to be passed to EViews save command. It can take values like "t=png",-c and so on.

save_path

Object or a character string representing the path to the folder to save the EViews graphs. The current working directory is the default save_path. Specify the save_path only if you want the EViews graphs to live in different path from the current working directory.

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 u for undated, a for annual, m for monthly and so on.

start_date

Object or a character string representing the start date. It should be left blank for undated (when the frequency is u).

save_copy

Logical. Whether to save the copy of the graph objects.

Value

An EViews workfile

See Also

Other important functions: EviewsR, create_object(), eng_eviews(), eviews_import(), eviews_pagesave(), eviews_wfcreate(), eviews_wfsave(), exec_commands(), export_dataframe(), export(), import_equation(), import_graph(), import_kable(), import_series(), import_table(), import_workfile(), import(), rwalk(), set_eviews_path()

Examples

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)

[Package EviewsR version 0.1.6 Index]