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"
Related
I'm trying to re-run some code that worked well previously. When I enter my code, I get this error:
could not find function rpart
However, when I run the find.package function, I have it:
[1] "C:/Users/maltm/Documents/R/win-library/4.0/rpart"
I also get this warning:
package ‘rpart’ was built under R version 4.0.5
It also tells me I need the stats package, which the find.package function tells me I have. Here's the error message for that:
Error: package ‘stats’ could not be loaded`
In addition: Warning message:
package ‘rpart’ was built under R version 4.0.5
Warning: namespace ‘stats’ is not available and has been replaced
by .GlobalEnv when processing object ‘<unknown>’
I just reinstalled R and have the latest version (2021.09.0,Build 351; check for updates tells me I have the latest version), so am not sure what to do here. Thanks in advance for any guidance.
I wish to use a package called rclinicaltrials, on using install.packages(), I get the following message -
Warning in install.packages :
package ‘rclinicaltrials’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
And after installing, on using library(), I get the message -
Error in library(rclinicaltrials) :
there is no package called ‘rclinicaltrials’
Is there any way of using this package in my version of R? I am using R version 4.1.0 (2021-05-18). Or do I need to install an older version of R?
Thank you
I'm new in R programming. Want a run little script for TTR package, but getting version error
Here is my code part
options(repos=(CRAN="https://CRAN.R-project.org/package=TTR"))
install.packages("https://CRAN.R-project.org/package=TTR")
and here is error I get
Warning: unable to access index for repository https://CRAN.R-project.org/package=TTR/src/contrib:
cannot open URL 'https://CRAN.R-project.org/package=TTR/src/contrib/PACKAGES'
Warning message: package 'https://CRAN.R-project.org/package=TTR' is not available (for R version 3.4.4)
Error in library(TTR) : there is no package called 'TTR'
but when I run TTR library from https://rdrr.io/snippets/ , it works well, and R version in the link is 3.4.4
How can I solve this problem?
EDIT: I see this question How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?, but can not find my solution
I tried it with your command, and i get the same error. But using the standard way with install.packages does the job.
You can install the package with:
install.packages('TTR', dependencies=TRUE, repos='http://cran.rstudio.com/')
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")).
I am trying to install "rpart" package in R. But I am getting the following error.
> install.packages('rpart')
Warning in install.packages("rpart") :
argument 'lib' is missing: using '/home/sandeep/R/i686-pc-linux-gnu-library/2.11'
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘rpart’ is not available
Can anyone please tell whats the error about? How to solve?
A tip to start: If you're not sure whether you have a package already, you can use eg the function find.package() to check:
> find.package('rpart')
[1] "D:/R/library/rpart"
> find.package('lololool')
Error in find.package("lololool") : there is no package called 'lololool'
The problem is not so much that it is installed by default. It can be downloaded and installed from CRAN without problem using install.packages('rpart'), but if you check at the package page on CRAN, you see a very important line:
Depends: R (≥ 2.13.0), graphics, stats, grDevices
which tells you that it is only available for R 2.13 and following versions. From your error, I deduce you still run 2.11. Quite some packages are not available for that old R version from CRAN any more, so you better update your R. Otherwise you'll run into this problem more often.
Be aware that if you run Debian, you'll have to do a bit more effort, as the default R in debian is always outdated. Just in case, you find the directions to do that here.
I found that once I restarted RStudio that I was able to install the package and find.package() showed I did, now, have the packages.