Currently harp is only available on linux.
Install harp with ansible
You can install harp through an ansible script. This will check if R, RStudio, the necessary system libraries and R libraries are installed, and then install anything that is missing. First update the system’s list of resources.
Then install ansible with the command
Download the file install_r_harp.txt, but save it with a .yml extension instead of .txt. Before you run it, ensure that you use the latest version of RStudio in the line
You can find what the latest version is at the RStudio webpages.
Then run the command
If you are not comfortable with ansible, follow the steps to installing harp manually.
Install harp manually
We will often use harp with an R library called tidyverse. They are both dependent on system libraries. To install these, open the terminal.
Update the package list from your distro's software repository with the latest versions with the command
Install the libraries as indicated.
sudo apt install libcurl4-openssl-dev
sudo apt install libxml2-dev
sudo apt install libnetcdf-dev
sudo apt install libssl-dev
Have a look at instructions for installing R if it is not installed already. Ensure that you follow the instructions for the version of ubuntu that you use. Also pay attention to the part explaining how to ensure that the newest version of R is installed.
RStudio (Desktop) is convenient. I prefer downloading the .deb file, which is then installed by running in terminal
If gdebi is not already installed, it can be done by running in terminal
harp is only available on github, so to be able to install it, you must install the packages remotes. Also install the package tidyverse. In R or RStudio run the command
It may be beneficial to install some of the harp packages individually, in this order:
If you encounter a problem with API rate limit exceeded you just have to wait until the reset time (it is in UTC ), before retrying to install. This is typically a 15 minutes wait.