Options$repos default problem


#1

I recently had to reload R (3.51). Ever since, whenever I load or update an option, I get a warning:

Warning: unable to access index for repository NA/src/contrib:
scheme not supported in URL 'NA/src/contrib/PACKAGES'

The source of this error is obviou. I looked at options$repos, and the last entry is:

NA

I have been unable to remove this erroneous last entry permanently. Is there a way to reset the startup repos entry to remove this annoying, but apparently harmless, warning?

Thanks in advance for any help with this issue.

Larry Hunsicker


#2

You can set repo with options(repos = c(CRAN = "https://cloud.r-project.org/") that you can put in your .Rprofile.

However, you should have a default repo configured. You can check that you don't have a repos set somewhere that erasing the default one with NA.

Do you have this error in an R session, an RStudio project or every time ?