package ‘mapdata’ was built under R version 4.0.4 - r

I was trying to make an excercise and I was using "climatol" package but when I tried to install it, two messages appeared and both said that "was built under R version 4.0.4 " in "maps" and "mapdata"... Are they similar packages or how can I update them or what can I do?

Sounds like related packages maps and mapdata were built under a previous version of R running on your system.
This, and other similar packages, can ideally be corrected by running:
update.packages( ask=FALSE, checkBuilt=TRUE )

Related

The package obdc is listed on CRAN-R but not available to install

I'm trying to run MS SQL Server scrips in a R script and learning how to do this.
The way I found to be the the most complete is through DBI + obdc package.
And then the problem appear:
package ‘obdc’ is not available (for R version 4.0.2)
I've checked and the obdc package is listed on CRAN-r.
How do I solve this kind of problem?
Bonus: Any tips on how do I know the most recent R-compatible version for a given package?
Bonus 2: I've tried to install the R 4.0.3 (released 10/10/20), but I couldn't even acess cran repository, I haven't a clue why. So I will be using R 4.0.2 for a little while till I try to update again.
Thanks for reading!

Where are the R packages from previously installed versions?

After upgrading to R 3.6.2 I am getting a series of errors about earlier versions of libraries being used :
Error: package ‘stringi’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Execution halted
I have worked through several of these via
install.packages('stringi')
but that just leads down the rabbit hole to the next mismatched library. What I'd like to do is en-masse upgrade the existing libraries. Here is a suggestion to use:
lib_loc <- "<old R library path"
to_install <- unname(installed.packages(lib.loc = lib_loc)[, "Package"])
to_install
install.packages(pkgs = to_install)
However - where is the <old R library path> on ubuntu?
Update Based on suggestion from #RuiBarradas I ran:
update.packages(ask=FALSE)
But the "different internals" errors shown above still happens for many packages. So I am still looking for an answer to how to upgrade the ones installed on the older version of R (3.4.4)
Following did the trick - thanks to #RuiBarradas for the pointer to update.packages:
update.packages(checkBuilt=TRUE, ask=FALSE)

How to easily switch R versions on rstudio ubuntu based?

I need to install a package that gives the following error so I am looking for a solution to that. The first approach is looking at ways to chose the right R version.
Should I spend some more time on this or there are other approaches to overcome this issue?
For this package you need R (≥ 3.5.0), so R 3.4.4 is not sufficient for standard installation.
Check on the cran website of the package for further information.
For upgrading R on ubuntu check here (old link!)
Edit: wibeasley mentioned a new link in the commentary for updating R 3.5.0 on Ubuntu.
Check the new link

Blotter cannot be loaded in r 3.5.1

I was able to use blotter and run quantstrat fine with previous r version
However, I have updated R vesion to 3.5.1 and when I load blotter I receive this msg when loading blotter:
"Error: package or namespace load failed for ‘blotter’: package ‘blotter’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version"
I have tried reinstall all packages. but blotter still does not work. There are info about many different r packages that return same error after R 3.5. but I cannot find a solution to this one. and it does not seem liek anyone has posted similar question on stackoverflow.
Can anyone give me some tips
Thx!
Use the same method I suggested for quantstrat package.
Tried Everying, Searched Everything, Issues installing Quantstrat package from Github
Let me know if it works.

R package listed on CRAN but not in available package

I want to install a package that is listed in https://cran.r-project.org/web/packages/available_packages_by_name.html as available in CRAN, but when I check in R the install packages menu or the available.packages() command, I can't see the package there.
Do I need to do something different to install those packages? Why aren't those packages available?
The packages I'm interested on are WikipediR ( https://cran.r-project.org/web/packages/WikipediR/index.html ), WikidataR and WikipediaR.
If it matters, I'm using R 2.15.0 in Windows XP.
See the documentation for ?available.packages...
By default, the return value includes only packages whose version and
OS requirements are met by the running version of R, and only gives
information on the latest versions of packages.
In other words... your R 2.15 is likely too old for the package you are looking to download.
You can try to download the package source manually add the package to the package library usually found somewhere like "win-library/2.15/" but like Cory mentioned it is likely that the older version of R does not support the package build.
The advice given so far is a bit incomplete although I do agree you need to update your R version if you want to use these packages. Looks like they don't need compilation so you might have been able to either install from a local copy or drop R code in, but critically they depend on httr which requires R 3.0.0 or above. They were released only relatively recently, so there will be no Windows binaries from back in 2012. (Your copy of R is from 30-Mar-2012.) Look in the DESCRIPTION file which is presented in a nice web format at the CRAN/package listing:
https://cran.r-project.org/web/packages/WikidataR/index.html
Imports: httr, jsonlite, WikipediR
Suggests: testthat, knitr, pageviews
# only one version of these two
https://cran.r-project.org/src/contrib/Archive/WikidataR/WikidataR_1.0.0.tar.gz
https://cran.r-project.org/src/contrib/Archive/WikipediaR/WikipediaR_1.0.tar.gz
# pick one of these
https://cran.r-project.org/src/contrib/Archive/WikipediR/

Resources