The package provides functions to test the hedge and safe haven hypotheses.
Step 1: Install the devtools package
To install a R package, start by installing the devtools package. The best way to do this is from CRAN, by typing:
install.packages("devtools")Step 2: Install the package of interest from GitHub
Install the package of interest from GitHub using the following code, where you need to remember to list both the author and the name of the package (in GitHub jargon, the package is the repo, which is short for repository). In this example, we are installing the ‘HedgeSafeHaven’ package created by ‘syedjawadshahzad’.
library(devtools)
install_github("https://github.com/syedjawadshahzad/HedgeSafeHaven")
library(HedgeSafeHaven)