Installs the specified R package in the current external R connection.
Syntax
xpackage(options) package_name
xpackage is only supported for external R connections (no MATLAB support) and is used to verify that a specific R package has been installed. If the package is not found, it is downloaded and installed automatically. package_name should be the name of the R package (case-sensitive).
Options
prompt | If the specified package is not found, this option forces EViews to warn the user that an R package is missing and must be installed before continuing. By default, in an EViews program, prompt is off. When running XPACKAGE from the command window, prompt is always on. |
repos=http://… | Specifies which R repository URL to use to download the package. If not specified, EViews will attempt to find the current repo site in the current R profile. If not found, and prompt is on, EViews will then ask the user to pick a repo site from the standard R CRAN mirror list. Otherwise, EViews will default to: https://cran.cnr.berkeley.edu |
Examples
xpackage rscproxy
verifies the existence of the rscproxy package. If not found, EViews will attempt to download and install it.
xopen(prompt) forecast
verifies the existence of the forecast package. If not found, EViews will first prompt the user with a timed dialog stating that the rscproxy must first be installed. Once the user clicks Yes or the dialog times out (5 seconds), EViews will then attempt to download and install it.
xopen(repos= https://muug.ca/mirror/cran) GETS
verifies the existence of the GETS package. If not found, EViews will attempt to download and install it from the specified repos link.
Cross-references