Hola Felipe,
tenía el mismo problema. Después de rabiar mucho pude solucionarlo. Abajo copio en inglés (por si a alguien más le llega a servir) la forma en la que pude resolver este problema. Espero te funcione, saludos desde Argentina.
Look for the file " Rprofile " (folder: C:\Program Files\Dinamica EGO 7\R\library\base\R)
Open it with the notepad and paste AT THE END the following:
myPaths <- .libPaths() # get the paths
myPaths <- c(myPaths[2], myPaths[1]) # switch them
.libPaths(myPaths)
Save and close
Open C:\Program Files\Dinamica EGO 7\R\bin\R.exe AS ADMINISTRATOR
Copy and paste one by one the following lines and press enter:
install.packages("remotes")
library(remotes)
install_version("rgdal", version = "1.6-7") ## if it can not download change to version 1.6-5
library(rgdal)
detach("package:sp", unload = TRUE) ## to detach the sp package from the default library
install.packages("sp") ## to install it in the Dinamica R Library
install.packages("rlang")
## install.packages("terra") ## Failed
install_version("terra", version = "1.7-39")
## install.packages("maptools") ## Failed
install_version("maptools", version = "1.1-8")