library(rmarkdown)
knitr::opts_chunk$set(echo = TRUE)

Installing R and RStudio

In order to download and use the aWhere API R package, the R programming language will need to be installed on your computer. You can download and install R here: https://cloud.r-project.org.

We also recommend installing RStudio for writing and developing your code. RStudio is a free program that includes many useful features and functions including code syntax highlighting, a GUI interface for writing and maintaining code, files, plots, etc. It is not necessary to use RStudio to use R, but it will make it easier. RStudio can be downloaded here: https://www.rstudio.com/products/rstudio/download/#download.

Installing the aWhere API R package

aWhere's API package for querying our API is hosted on GitHub and not R's central hub for installing packages, CRAN. In order to install the aWhere package directly from GitHub, we need to use a function from the devtools package. If you do not already have the devtools package installed on your computer, or are unsure, you can install it by running install.packages("devtools") in your R console.

Once the devtools package is installed, you can install the aWhere API package by running devtools::install_github("aWhereAPI/aWhere-R-Library").

The aWhere package references several other R packages in its inner functions. Therefore those packages must also be installed in order for the aWhere package to function as expected. If you run into issues when first installing the aWhere package, try installing these packages: install.packages(c('chron', 'magrittr', 'btcops', 'DBI', 'assertthat', 'Rcpp', 'tibble')), and then re-install the aWhere package.

Upon re-install, if you are still presented with an error message stating that a certain package is not installed, use the install.packages() function to install the specified package.

library(devtools)

#Run if packages are not already installed
#install.packages(c('chron', 'magrittr', 'btcops', 'DBI', 'assertthat', 'Rcpp', 'tibble')

devtools::install_github("aWhereAPI/aWhere-R-Library")


aWhereAPI/aWhere-R-Library documentation built on Nov. 5, 2021, 3:35 a.m.