Installing this package ensures that the R packages needed for the AniMove course are available on each participant's computer. In addition, it provides example data to be used during the lectures.
install.packages("remotes")
remotes::install_github("AniMoveCourse/animove_R_package")
- If you get an issue similar to:
Error: Failed to install 'unknown package' from GitHub:
HTTP error 401.
Bad credentials
The suggestion described here should solve it
- If you get an issue similar to:
Downloading GitHub repo AniMoveCourse/animove_R_package@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/AniMoveCourse/animove_R_package/tarball/HEAD' failed
The suggestion here (options(timeout=400)
) seems to solve the problem.
- Mostly for windows users,
if the library doMC
fails to install, install it manually with install.packages("doMC", repos="http://R-Forge.R-project.org")
and than installing the animove R library again should work.
- If if you get asked to register a token
If you have a github account, go here https://github.com/settings/tokens to create a token.
Than run in the R console GITHUB_PAT=your-token-without-quotes
Restart R and try to install this library again
library(animove)
library(raster)
## Load movement data of African buffalo
data(buffalo_ll_mv2) # unprojected (LatLong)
data(buffalo_utm_mv2) # projected (UTM 36S)
## Environmental layers
data(buffalo_env)
## Plot
plot(buffalo_env[[1]])
points(sf::st_coordinates(buffalo_utm_mv2))