[R] Problem in loading packages
Peter Dalgaard
pd@|gd @end|ng |rom gm@||@com
Sun Sep 6 10:19:52 CEST 2026
At any rate, I suspect that the real issue here is that the OP has been downloading packages directly from CRAN, i.e. from the links that look like this:
----
Downloads:
Package source: betaselectr_0.2.4.tar.gz
Windows binaries: r-devel: betaselectr_0.2.3.zip, r-release: betaselectr_0.2.3.zip, r-oldrel: betaselectr_0.2.3.zip
macOS binaries: r-release (arm64): betaselectr_0.2.3.tgz, r-oldrel (arm64): betaselectr_0.2.3.tgz, r-release (x86_64): betaselectr_0.2.3.tgz, r-oldrel (x86_64): betaselectr_0.2.3.tgz
Old sources: betaselectr archive
——
Hardly anyone does that these days (they use install.packages() etc.), but if you do, choose the one that matches your R installation, which would generally be "r-release” (currently 4.6.x) and not “r-devel” (proto-4.7.0).
If you expand the links, you will see that they expand to e.g.
https://cran.r-project.org/bin/windows/contrib/4.7/betaselectr_0.2.3.zip, so they are different files even if the name is the same.
This is (or can be) important because we only try to maintain binary compatibility between x.y.z versions for fixed values of x and y
-pd
> On 4 Sep 2026, at 19.05, Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
>
> 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.
>
> ______________________________________________
> 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