I'm using the following code to install the baseballr package from GitHub:
require(devtools)
install_github("BillPetti/baseballr")
require(baseballr)
However, I keep getting the following error when running require(baseballr):
Loading required package: baseballr
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘baseballr’
Also, when I run install_github("BillPetti/baseballr"), I get the following error:
package ‘glue’ successfully unpacked and MD5 sums checked
Error: (converted from warning) cannot remove prior installation of package ‘glue’
In addition: Warning messages:
1: In untar2(tarfile, files, list, exdir) :
skipping pax global extended headers
2: In untar2(tarfile, files, list, exdir) :
skipping pax global extended headers
devtools is properly installed but I'm just not sure why baseballr won't properly install. The documentation for the package can be found here.
Related
I'm trying to load some RData files with the function load, but I get this message:
Warning: namespace ‘DESeq’ is not available and has been replaced
by .GlobalEnv when processing object ‘cds3’
Loading required package: DESeq
Error in .requirePackage(package) :
unable to find required package ‘DESeq’
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘DESeq’
Which means that this file can only be opened if I have the old DEseq package installed. I know it's an old package, but I have looked everywhere and searched the bioconductor guide for this package, and tried this code:
source("https://bioconductor.org/biocLite.R")
biocLite("DESeq")
and got this error
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
I already have DEseq2 but I need the first DEseq. I really need to load those files, what can I do ?
I wanted to run some code that uses the 'rethinking' library. As instructed there, I first installed rstan, which went fine, then typed
install_github("rmcelreath/rethinking")
The latter gives the errors:
Error: package or namespace load failed for 'ggplot2' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace 'ellipsis' 0.3.1 is being loaded, but >= 0.3.2 is required
Error: package 'ggplot2' could not be loaded
In addition: Warning messages:
1: package 'rstan' was built under R version 4.0.5
2: package 'StanHeaders' was built under R version 4.0.5
3: package 'ggplot2' was built under R version 4.0.5
Execution halted
ERROR: lazy loading failed for package 'rethinking'
* removing 'C:/Program Files/R/R-4.0.3/library/rethinking'
Warning messages:
1: In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Program Files\R\R-4.0.3\library\00LOCK\curl\libs\x64\curl.dll to C:\Program Files\R\R-4.0.3\library\curl\libs\x64\curl.dll: Permission denied
2: In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Program Files\R\R-4.0.3\library\00LOCK\ps\libs\x64\ps.dll to C:\Program Files\R\R-4.0.3\library\ps\libs\x64\ps.dll: Permission denied
3: In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Program Files\R\R-4.0.3\library\00LOCK\ellipsis\libs\x64\ellipsis.dll to C:\Program Files\R\R-4.0.3\library\ellipsis\libs\x64\ellipsis.dll: Permission denied
4: In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Program Files\R\R-4.0.3\library\00LOCK\digest\libs\x64\digest.dll to C:\Program Files\R\R-4.0.3\library\digest\libs\x64\digest.dll: Permission denied
5: In i.p(...) :
installation of package ‘C:/Users/User/AppData/Local/Temp/RtmpAfQQaY/file1268133e3024/rethinking_2.13.tar.gz’ had non-zero exit status
> source("~/.active-rstudio-document", echo=TRUE)
Indeed, if I try to run code from the library, I get:
> library(rethinking)
Error in library(rethinking) : there is no package called ‘rethinking’
I am running Rstudio 2021.09.0 as administrator, on Windows 10.
I also tried installing the library from the Packages|Install button, but that gives
> install.packages("rethinking")
Warning in install.packages :
package ‘rethinking’ is not available for this version of R
The solutions suggested here did not work for me. Any help would be appreciated!
EDIT: for solution, please see comments - thanks for the replies!
I'm trying to install rspatial package using:
if (!require("rspatial")) devtools::install_github('rspatial/rspatial')
but I received below error:
Error: Failed to install 'rspatial' from GitHub:
(converted from warning) installation of package ‘C:/Users/A02243~1/AppData/Local/Temp/Rtmpgx3SZq/file16441e95c6/rspatial_1.0-0.tar.gz’ had non-zero exit status
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘rspatial’
Also, I used:
install.packages("rspatial")
and I received below warning
Warning in install.packages :
package ‘rspatial’ is not available (for R version 3.5.2)
Is there any other ways that will install rspatial on R version 3.5.2?
Thanks.
3.5.2 has some issues with devtools - try updating processx package and see if that resolves the issue.
I just installed R using anaconda, and I am following this tutorial:
https://www.analyticsvidhya.com/blog/2016/03/tutorial-powerful-packages-imputing-missing-values/
I learned that I need to install some package by using:
if(!require(Hmisc)) install.packages("Hmisc",repos = "http://cran.us.r-project.org")
There are some warning message i am not sure whether it means successful or not:
Loading required package: Hmisc
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'Hmisc'also installing the dependencies 'survival', 'ggplot2'
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'survival' had non-zero exit status
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'ggplot2' had non-zero exit status
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'Hmisc' had non-zero exit status
The downloaded source packages are in
'/tmp/Rtmpcf6rZ9/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Then I tried to load the library with
library(Hmisc)
But I got the error,
Error in library(Hmisc): there is no package called 'Hmisc'
Does anyone know what might has happened? Thanks.
Edit:
I am suggested to try a few more ways, but they all have various error:
install.packages("Hmisc")
Error in contrib.url(repos, type): trying to use CRAN without setting a mirror
If I do:
install.packages("Hmisc",repos = "http://cran.us.r-project.org")
I got:
also installing the dependencies 'survival', 'ggplot2'
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'survival' had non-zero exit status
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'ggplot2' had non-zero exit status
Warning message:
In install.packages("Hmisc", repos = "http://cran.us.r-project.org"): installation of package 'Hmisc' had non-zero exit status
The downloaded source packages are in
'/tmp/Rtmpcf6rZ9/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
I am suggested not to use Anaconda R, but because I mostly use rpy2 and jupiter notebook the most. I think using the Anaconda R may be the most straight forward method to get my jupiter notebook and python to work seamlessly with R.
I had a similar issue, solved it by installing "acepack" directly install.packages('acepack')
This is mysterious, regardless. I do an update of all packages in Conda. Then, I install Rstudio using anaconda. Then the error does not exist anymore...
How to install DBI with R (version 2.5(windows))? I am unable to install DBI (0.2)
I used:
install.packages("DBI", repos="http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz")
It gives error:
Warning in install.packages("DBI", repos = "http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz") :
argument 'lib' is missing: using 'C:\Users\USER\Documents/R/win-library/2.7'
Warning: unable to access index for repository http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz/bin/windows/contrib/2.7
Warning message:
package ‘DBI’ is not available
If i used the process used in the here(suggest as a duplicate question).
I get this error:
install.packages("http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz",repos=NULL, type="source")
Warning in install.packages("http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz", :
argument 'lib' is missing: using 'C:\Users\USER\Documents/R/win-library/2.7'
Can't locate R/Dcf.pm in #INC (#INC contains: C \PROGRA~2\R\R-27~1.0\share\perl; /usr/lib/perl5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) at C:\PROGRA~2\R\R-27~1.0/bin/INSTALL line 23.
BEGIN failed--compilation aborted at C:\PROGRA~2\R\R-27~1.0/bin/INSTALL line 23.
Warning message:
In install.packages("http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz", :
installation of package 'http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz' had non-zero exit status
How to install old version of DBI in R?