[R] Problem in loading packages

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Fri Sep 4 19:05:14 CEST 2026


A minor correction inline...

On 2026-09-04 12:34 p.m., Rui Barradas wrote:
> Hello,
> 
> I have been following this thread and it seems that the OP is running
> R 4.6.1 on Windows, which is the most up-to-date R version on CRAN.
> On Windows, binary packages are always available so I think the
> (obvious?) solution is to install the binary packages from CRAN with a
> qualified command:
> 
> 
> utils::install.packages("pkgname", repos = "https://cloud.r-project.org/")
> 
> 
> The repository "https://cloud.r-project.org/" is CRAN's repo.

That's not quite right.  cloud.r-project.org redirects to mirrors of the 
master CRAN repository.  It is currently sponsored and maintained by 
Posit, and both it and cran.rstudio.com lead to the same place(s).

Duncan Murdoch

> The OP can also avoid having to set the repo by editing the file
> R-4.6.1/etc/Rprofile.site. Add the following
> 
> 
> # set a CRAN mirror
> local({r <- getOption("repos")
>        r["CRAN"] <- "https://cloud.r-project.org/"
>        options(repos=r)})
> 
> 
> 
> The comment line '# set a CRAN mirror' should already be there, edit
> the 'local' instruction as above, save and restart R.
> 
> Hope this helps,
> Rui Barradas
> 
> CALUM POLWART <polc1410 using gmail.com> escreveu (sexta, 4/09/2026 à(s) 16:52):
>>
>> Is this an *Error* or a *Warning* that is produced.
>>
>> I think it is "normal" that if you install a package and it was produced
>> for a different version of R you get a warning. Warnings are just that, not
>> errors.
>>
>> I think your options to make that go away are:
>>
>> Upgrade your R to 4.7
>> Install a specific version of the package (that's hard work) - it needs you
>> to know which package version was built from your current R
>> Suppress the warning (fixes nothing but you just don't see it) use
>> library(packagename, quietly= T)
>>
>> On Fri, 4 Sept 2026, 13:32 Michael Dewey via R-help, <r-help using r-project.org>
>> wrote:
>>
>>> I think we need more information here.
>>>
>>> Try running R outside RStudio and then issue
>>>
>>> install.packages("insert a package name here")
>>>
>>> then run sessionInfo()
>>>
>>> and then post all the output here.
>>>
>>> It would also help to know which CRAN mirror you use.
>>>
>>> Michael
>>>
>>> On 03/09/2026 17:45, Halilu Rahaman Alhassan wrote:
>>>> Thank you for the response.
>>>>
>>>> I tried using pacman to load the packages I need, but it was not working
>>>> for me. So I decided to download those packages on CRAN . Even though it
>>>> was installed successfully, yet, when I try loading each package I get
>>> the
>>>> response mentioned earlier
>>>>
>>>> On Thu, 3 Sept 2026, 11:57 Duncan Murdoch, <murdoch.duncan using gmail.com>
>>> wrote:
>>>>
>>>>> On 2026-09-02 7:42 a.m., Halilu Rahaman Alhassan wrote:
>>>>>> Dear sir/madam,
>>>>>>
>>>>>> I guess my message finds you well. Please I am having the supposed
>>>>> current
>>>>>> R version 4.6.1 for windows. But after downloading the packages, I find
>>>>> it
>>>>>> difficult loading them on R studio, even though they can be seen under
>>>>>> packages. When ever I tried loading them, it tells me that those
>>> packages
>>>>>> were created under R version 4.7.0. Please I need your help to be able
>>> to
>>>>>> deal with such problem.
>>>>>>
>>>>>> Kind regards,
>>>>>> Halilu Rahaman Alhassan
>>>>>>
>>>>>>         [[alternative HTML version deleted]]
>>>>> It sounds as though you downloaded the wrong files, but you don't give
>>>>> details about how you did the downloads or installed them into R, so I
>>>>> can't guess how that happened.
>>>>>
>>>>> The standard safe way to install packages is to run R and then in R run
>>>>> "install.packages("packagename")".  It might ask you to specify a
>>>>> mirror; generally the first one in the list is safe.  On my system, that
>>>>> is displayed as "0-Cloud".
>>>>>
>>>>> If you are running RStudio, then you will get somewhat different
>>>>> behaviour because it inserts its own install.packages() function, but it
>>>>> should still work.  If not, try it in a plain R session.
>>>>>
>>>>> Duncan Murdoch
>>>>>
>>>>>
>>>>>
>>>>
>>>>        [[alternative HTML version deleted]]
>>>>
>>>> ______________________________________________
>>>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide
>>> https://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>> --
>>> Michael Dewey
>>>
>>> ______________________________________________
>>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> https://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>>          [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list