How to fix error: package 'tzdb' is not available for this version of R - r

I'm new at R and trying to usetidyverse. The installation seems to go fine, but when I want to load the package, I get this error: there is no package called 'tzdb'. When I try to install 'tzdb' I get a warning that package 'tzdb' is not available for this version of R. I'm using version 4.0.5, which I believe should work.
Any suggestions on how I can get this package to work (so I can start using tidyverse)?
Edit: I've added an image of the code I ran + the outputs of sessionInfo() , options("repos") and .libPaths() below. (I'm sorry I can't copy paste code nor use the browser of the virtual machine that I work from).
https://i.stack.imgur.com/hra1r.png
It does give a warning stating that the CRAN mirror is set to an insecure URL. Could that be the problem? It didnt't seem matter for the other packages.

Related

R studio install package failed

I tried to install the packages in the following way:
pacman::p_load(tidyverse, lubridate, zoo,
timetk, modeltime,
trelliscopejs, seasonal,
tsibble, feasts, fable)
However, I got the below errors:
I'm not sure what's wrong, I'm using the latest R version 4.2.1, the warning seems to suggest that need to change to 4.1.3, is there anyway to install those packages without changing the version?
The problem is not related to the package in itself. The warning about the version only tells you that the last time this package was built was on R 4.1.3, but it should work on R 4.2.
The problem is that the place where R searches this package doesn't exist. If you go here: https://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/, you will see that the last version of R is 3.4, whereas you're looking for a package built in R 4.1 (see the version in the URL address in the error message).
Here's some advice to solve this (I can't reproduce your problem so I can't be sure this works): if you're using RStudio, go to "Tools -> Global Options -> Packages". I think that under "Primary CRAN repository", there should be the name of the current place where R searches for the files to install each package. You can change this: either pick "Global (CDN) - RStudio" or any other that is not too far from your location. Then restart R and try reinstalling the packages.

Difficulty installing a package in R linux, dalton_rqi

Downloaded package from below URL.
Attempted to install using below command; response shown.
library(dalton.rqi,lib.loc='/home/X/Desktop/')
Error: package ‘dalton.rqi’ was built before R 3.0.0: please re-install it
https://my.clevelandclinic.org/departments/anesthesiology/depts/outcomes-research/risk-quantification
It appears this is a compiled package that maybe I don't have the source for? Is there a way to force install of the package? I'm unable to install using Rstudio GUI in its current form as a zip. Tried repackaging to tar.gz has Rstudio was looking for and also had a non-zero exit status error.
Any ideas?
I'm afraid this can't be achieved directly. The error message says it well: to use a package in R it needs to be built on an R version matching yours.
I can suggest two ways to move forward:
Contact the authors, ask for the R sources (it is somewhat surprising they did not make them available in the first place), and build the package yourself.
Downgrade your R version as far back as needed to match the one this pre-built package used.

r package installed properly but "there is no package called ‘DiabetesTxPath-master" error

I'm trying to install a package called "DiabetesTxPath-master" from local files.(The file can be downloaded in https://github.com/rohit43/DiabetesTxPath)
I used the code below installing it.
'filename<-"DiabetesTxPath-master.zip"'
install.packages(filename,type="binary",repos=NULL)
but when I try to load the packaged by the code below,
library(DiabetesTxPath)
error comes up.
there is no package called ‘DiabetesTxPath-master'
There is no problem in location.
.libPaths()
[1] "C:/Program Files/R/R-3.4.2/library"'
and this is where I want my package to be installed.
(and I see my packaged installed in the folder with my eyes!)
2.I've also tried to run as an administrator. it didn't work either.
So what could be the probelm, and how could I fix this?
Any comment would be appreciated so much.
I've been trying it so hard for a week.
Try using
library(devtools)
install_github("rohit43/DiabetesTxPath")
the problem arises because the dependencies for this package
ERROR: dependencies 'FeatureExtraction', 'CohortMethod',
'OhdsiSharing' are not available for package 'DiabetesTxPath'
are not available for this package in R 3.5 and above .
Now you need to install older version of R where these dependencies were supported and try using the above method.

errors when installing older dplyr package in R

Im a bit new to R and need to use/adapt someone else code in R.
My supervisor uses R version 3.2.2 with the dplyr package version 0.4.3 (to overcome errors and problems with the original code).
I tried to install the older dplyr package with different methods:
- installed devtools package and then used the url devtools::install_url("http://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_0.1.2.tar.gz")
- manual installation (where I downloaded the file and tried to install it.) Installation seemed to have worked but when I run the code it gives a fatal error massage
Every way I've tried so far either gives a lot of error messages or a fatal error and shutdown.
When using help ?dplyr it gives a pop-up that there is an error. Does anybody have any other ideas to install this package?
Thanks!

R 3.0.1 package build warning

I'm building R packages in R 3.0.1 on a Windows machine, using Rtools30 and the 'Build' tools associated with RStudio, which I assume is tied in with devtools (which is up-to-date). My typical process to build a package is:
Load All
Reoxygenize
Build & Reload
Check
Build Source Package
If everything goes without errors or warnings, I then:
install.packages("foo.tar.gz", repos=NULL, type="source")
Since upgrading to R 3.0.1, I now get this warning:
Warning in install.packages :
foo.tar.gz is not available (for R version 3.0.1)
I also tried before installing, and it did not get rid of the warning:
options(install.packages.check.source = FALSE)
Also, I notice this warning when I open the devtools library:
WARNING: Rtools 3.0 found on the path at c:/Rtools is not compatible with R 3.0.1.
Which is weird, Rtools 3.0 is suppose to be good from R >2.15.1 to R 3.0.x
Any ideas what is going on?
This is RStudio specific, as they wrap and/or changed a lot of functions from the utils for better integration. The problem lies with a call to getDependencies() to check for dependencies. But that function will also check whether the original package exists on CRAN and throws the given warning when it doesn't. A package you just built on your own computer is obviously not on CRAN, hence the warning.
In the source of the native install.packages(), getDependencies() isn't called in case you build from source or install from a different repository respectively. RStudio on the other hand calls getDependencies() before it passes everything on to the native install.packages() function.
This has to my knowledge no further effects, apart from confusing people. I didn't find a way to conveniently get rid of this in RStudio, as suppressWarnings() doesn't work in this context due to the complex way RStudio deals with this.
In a basic R console, you shouldn't have any problem.
So for the time being, I'd just ignore this and hope the RStudio team finds time to take care of this minor glitch.

Resources