eviews_import {EviewsR}R Documentation

Import data to EViews workfile

Description

Use this function in R, R Markdown and Quarto to import data to EViews workfile.

Usage

eviews_import(
  source_description = "",
  wf = "",
  type = "",
  options = "resize",
  smpl_string = "@all",
  genr_string = "",
  rename_string = "",
  frequency = "",
  start_date = "",
  id = "",
  destid = "",
  append = FALSE,
  save_path = ""
)

Arguments

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 EViews workfile.

type

Optional. Specify the file type, it can values allowed by EViews import commands like access, text. For the most part, you should not need to specify a “type=” option as EViews will automatically determine the type from the filename.

options

Optional.Specify the EViews options for import command like resize, link, page=page_name.

smpl_string

Optional. Specify the sample to be used for the data import.

genr_string

Optional. Any valid EViews series creation expression to be used to generate a new series in the workfile as part of the import procedure.

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 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).

id

Name of EViews ID series. Required for EViews Match-Merge Import.

destid

Name of the destination ID. Required for EViews Match-Merge Import.

append

Logical, whether to append to the bottom of the EViews workfile page or not.

save_path

Specify the path to save the Eviews workfile

Value

An EViews workfile

See Also

Other important functions: EviewsR, create_object(), eng_eviews(), eviews_graph(), 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: 
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)

[Package EviewsR version 0.1.5 Index]