0
Error in `contrib.url()`:
! trying to use CRAN without setting a mirror
Backtrace:
 1. utils::install.packages("dplyr", dependencies = TRUE)
 2. utils::contrib.url(repos, "source")
Execution halted

I originally installed the dplyr package to fix my first issue in r about "could not find find function recode in r" for my code below, but after I installed the package and fixed that issue, then this new error about "trying to use CRAN without setting a mirror" arose.

protestag<-recode(Event.tag,'Education'= 1, 'Executive' = 2, 'Racial Injustice' = 3, 'Collective Bargaining'= 4, 'Healthcare' = 5, 'Environment' = 6, 'Civil Rights'= 7)

install.packages("dplyr",dependencies = TRUE)
library(dplyr)

I entered in the code above, hoping this would fix my problem but I now I cant knit my code and cant figure out how to set a mirror for CRAN.

Phil
  • 7,287
  • 3
  • 36
  • 66
Aly
  • 1
  • 1
  • See https://stackoverflow.com/a/48881323/5221626 – Phil Jul 08 '23 at 04:41
  • Does this answer your question? [How to select a CRAN mirror in R](https://stackoverflow.com/questions/11488174/how-to-select-a-cran-mirror-in-r) – Mark Jul 08 '23 at 05:56

0 Answers0