Watts-College / paf-514-template

https://watts-college.github.io/paf-514-template/
1 stars 0 forks source link

R Package Assignment #68

Closed lkeo1 closed 3 weeks ago

lkeo1 commented 2 months ago

Hello,

I am working on the R Package Assignment and am having issues with installing the packages. I have Rtools downloaded already too but here is what it shows when I check R Package R Package


step 1.2.1 Install Development Packages

install.packages(c("devtools", "roxygen2","usethis","testthat","knitr"))
# if devtools is not working try
# devtools::build_github_devtools() 

You can check that you have everything installed and working by running the following code:

library(devtools)
has_devel()
## Your system is ready to build packages!
lecy commented 2 months ago

My guess is that you have the wrong version of Rtools (it must match your version of R). E.g. if you have R 4.3.3 install Rtools43 not Rtools44.

https://stackoverflow.com/questions/59022977/rtools-is-required-to-build-r-packages-but-is-not-currently-installed

Or it is located in a protected root directory that R is blocked from accessing by system permissions or an anti-virus program. This is common if you are using a work computer where you do not have administrative permissions:

https://stackoverflow.com/questions/55478024/r-development-tools-do-not-install-properly

pkgbuild::find_rtools()
pkgbuild::rtools_path()

Rtools will usually be installed in the root directory C:/ or in /Program Files/, which are sometimes protected directories (your computer does not want a program launching other programs without permission so it blocks access to root program directories). If you have the correct version installed and find_rtools() is able to locate it, you might have to change permissions on your antivirus software.