Problem finding packages while trying to install them in R - r

I'm trying to install some packages, including "ggplot2", "GEOquery", "limma", etc.
Meanwhile, I keep facing either one of the errors mentioned below:
(And the same errors with a different repository for "ggplot2" and "limma")
install.packages("GEOquery")
Warning in install.packages :
unable to access index for repository https://bioconductor.org/packages/3.9/bioc/src/contrib:
cannot open URL 'https://bioconductor.org/packages/3.9/bioc/src/contrib/PACKAGES'
Warning in install.packages :
package ‘GEOquery’ is not available (for R version 3.6.0)

Follow the suggestion here and try options(download.file.method="libcurl")).

Related

Failing to install panelr package

I am failing to read in the panelr package from the library. I used the package utilising its wbm() function on some panel data earlier this year and I have even tried to install it and I get this message: Warning in install.packages : package ‘panelr’ is not available (for R version 3.6.3).
Has the package been removed? Kindly assist on how I can install it or the new version of it.
If we want a specific version, use the versions package
install.packages('versions')
Then use
library(versions)
install.versions('panelr', '0.7.3')
If that version is not available in the MRAN repo, check the available versions with
available.versions('panelr')
If there are no versions available, then it returns an error. In that case, an option is to download the archived tar file from https://cran.r-project.org/src/contrib/Archive/panelr/ and then use install.packages to with source = TRUE
install.packages('path/to/.../...tar.gz', source = TRUE, repos = NULL)
Regarding your other question: Yes, it seems as it has been removed.

Error installing RQDA: unable to access index for repository NA/src/contrib:

I've downloaded GTK+ and installed it.
When I run install.packages(c('blob','RSQLite','RQDA')),
or install.packages("RQDA",dependencies=c("Depends", "Imports"))
I get this same error:
Warning in install.packages : unable to access index for repository
NA/src/contrib: scheme not supported in URL
'NA/src/contrib/PACKAGES' Warning in install.packages : packages
‘blob’, ‘RSQLite’, ‘RQDA’ are not available (for R version 3.6.3)
Warning in install.packages : unable to access index for repository
NA/bin/windows/contrib/3.6: scheme not supported in URL
'NA/bin/windows/contrib/3.6/PACKAGES'
What's the problem and what can I do?
RQDA cannot be installed directly since R 3.6, I understand. However, #BroVic developed an R package to install all the necessary dependencies (some not a part of R) called RQDAassist. I'm on Windows 10 and running R 4.1 and this worked for me:
# install.packages("devtools")
devtools::install_github("BroVic/RQDAassist")
RQDAassist::install()
Then you can simply launch RQDA from the console or in a md file
library(RQDA)

Error in caretTheme() : could not find function "caretTheme"

Can somebody point me in the right direction here, I am using the caret package and I am trying to run a caretTheme but it keeps returning the error:
Error in caretTheme() : could not find function "caretTheme"
I tried install.packages('caretTheme') and receive the error
"Warning in install.packages :
package ‘caretTheme’ is not available (for R version 3.4.1 Patched)"
I have searched on github and cannot find the package listed there or am I able to find it onlinee to bruteforce install using devtools::
Can you find the package available for download anywhere?
Try installing developmental version:
devtools::install_github("topepo/caret/pkg/caret")
library(caret)
exists("caretTheme")
[1] TRUE
sessionInfo()$otherPkgs$caret$Version
"6.0-77"

MacOS Rstudio devtools loading fails

I need to install the package devtools in R on my mac. The R version is 3.2.3.
It gives an error saying
Warning in install.packages :
download had nonzero exit status
Warning in install.packages :
download of package ‘curl’ failed
Other posts addressing similar issues provide solutions to Linux (with the apt-get command, etc) but doesn't seem to have a Mac solution. Highly appreciate if someone with insight can offer some guide here.
The problem pertains to the download, have a look at this discussion. You can consider downloading the package first and installing a package from a local zip file.
install.packages("local_package_file", repos = NULL)
or more specifically:
install.packages("devtools.zip", repos = NULL, type = "source")
as shown on the devtools # GitHub.
You didn't mentioned, but I understand that you have the Xcode installed as well. Alternatively, it could be informative to check if your R compiler has no problems with connecting to the Internet, you can use the code: is.character(getURL("www.google.com")).

ggplot2 version 1.0.1 won't load into R 3.2.2 for Windows

I just started using R and downloaded ggplot2
install.packages("ggplot2")
I get the following warning:
Warning in install.packages:
unable to move temporary installation '\\CHI-FIlE-01\UserFolders$\naresh.kavuri\Documents\R\win-library\3.2\file27ac2d3b613c\ggplot' to '\\CHI-FILE-01\UserFolders$\naresh.kavuri\Documents\R\win-library\3.2\ggplot2'
This warning is followed up with this error:
Error: invalid version specification 'NA'
In addition: warning message:
In utils:::packageDescription(packageName, fields = "Version") :
no package 'knitr' was found
As anyone come across this problem before? Did I do something wrong in the setup?
If you have multiple versions of R running, and you try to update or reinstall a package in one version of R while it is loaded in another, then the old version of the package doesn't get completely removed.
Try closing down all instances of R, manually deleting the folder containing the package, then opening a single version of R and reinstalling.
As Pascal commented, antivirus file scans can also interfere with the installation process. Sometimes downloading the package zip/tar.gz file then installing from disk can circumvent the issue.

Resources