Watts-College / paf-515-fall-2023

0 stars 0 forks source link

Install Maptools #3

Open castower opened 1 year ago

castower commented 1 year ago

The following are instructions on how to install the archived version of maptools:

If you have a Windows computer, you will need to do the following within your Rproject:

1) Ensure that you have rtools installed: You will typically find your installation directly in your C drive with a path something like: "C:\rtools40" If you don't, follow the instructions to install it: https://cran.r-project.org/bin/windows/Rtools/

2) Install devtools (if you haven't already) install.packages("devtools")

3) Set up .Renviron file

If you're using RENV do the following:

install.packages("usethis")
usethis::edit_r_environ(scope = "project")

Once you have your .Renviron file for your project, add the following to it (if your rtools folder is named something different, update the path accordingly):

RENV_PATHS_RTOOLS = "C:\rtools40"

See renv for details: https://rstudio.github.io/renv/reference/paths.html

If you're not using RENV, do the following: Sys.setenv(PATH = paste("C:/Rtools/bin", Sys.getenv("PATH"), sep=";"))

4) Finally, install the archived version of maptools devtools::install_version("maptools",version="1.1-8")

If you have a Mac do the following:

1) Ensure that you can compile packages See tutorial: https://clanfear.github.io/CSSS508/docs/compiling.html More technical version: https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/

2) Install devtools (if you haven't already) install.packages("devtools")

3) Install the archived version of maptools devtools::install_version("maptools",version="1.1-8")

Jmurtos commented 1 year ago

Thank you! It solved the problem of installing maptools.