Package ‘adegenet’ version 2.1.4 cannot be unloaded in R - r

I am trying to use a function in the R package adegenet
It seems like it will install fine, but then when i call the package i get an error.
> install.packages("adegenet")
Installing package into ‘/Users/j2/Library/R/4.1/library’
(as ‘lib’ is unspecified)
trying URL 'https://mirrors.nics.utk.edu/cran/bin/macosx/contrib/4.1/adegenet_2.1.5.tgz'
Content type 'application/x-gzip' length 2830546 bytes (2.7 MB)
==================================================
downloaded 2.7 MB
The downloaded binary packages are in
/var/folders/p9/cy6q_pk935z1dfplsjrts30h0000gr/T//RtmpZXEMHg/downloaded_packages
> library(adegenet)
Error in value[[3L]](cond) :
Package ‘adegenet’ version 2.1.4 cannot be unloaded:
Error in unloadNamespace(package) : namespace ‘adegenet’ is imported by ‘adephylo’ so cannot be unloaded
I'm not sure if the problem is with the install or calling the library. Any advice would be appreceated.
Thanks!

Related

Error downloading tidycensus library in R

I am trying to use the census_api_key() function in tidycensus, but keep getting an error that it can't be found, nor does it seem like the tidycensus library is being installed properly according to the error messages I am receiving.
Here is what I've done so far:
> install.packages("tidycensus")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/matia/OneDrive/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidycensus_0.11.4.zip'
Content type 'application/zip' length 2683556 bytes (2.6 MB)
downloaded 2.6 MB
> library(tidycensus)
Error: package or namespace load failed for ‘tidycensus’:
object ‘is_present’ is not exported by 'namespace:lifecycle'
In addition: Warning message:
package ‘tidycensus’ was built under R version 3.6.3
> census_api_key("my key")
Error in census_api_key("my key") :
could not find function "census_api_key"
I've also tried installing the rgdal library, as was suggested for other tidycensus errors, but this hasn't worked for me.
Any suggestions are greatly appreciated.

Having problems installing.packag("BatchGetSymbols")

I can't install.package("BatchGetSymbols") for some reason.
I am just doing this:
install.packages('BatchGetSymbols')
library(BatchGetSymbols)
and i am getting this:
> install.packages('BatchGetSymbols')
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘XML’ is not available
trying URL 'https://cran.rstudio.com/src/contrib/BatchGetSymbols_2.5.7.tar.gz'
Content type 'application/x-gzip' length 181321 bytes (177 KB)
==================================================
downloaded 177 KB
ERROR: dependency ‘XML’ is not available for package ‘BatchGetSymbols’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.6/BatchGetSymbols’
Warning in install.packages :
installation of package ‘BatchGetSymbols’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpAhaAos/downloaded_packages’
> library(BatchGetSymbols)
Error in library(BatchGetSymbols) :
there is no package called ‘BatchGetSymbols’
Does anyone understand why there is a problem??
Install the latest version of R before
Commands to install: https://cloud.r-project.org/bin/linux/
Choose the version of your system and run the commands
After that try to install the library.

Install R package gplots for R version 3.4.4?

I am trying to install 'gplots' in R 3.4.4, however I keep getting the following error:
install.packages("gplots")
Installing package into ‘/home/u1983390/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning: dependency ‘caTools’ is not available
trying URL 'https://cloud.r-project.org/src/contrib/gplots_3.0.3.tar.gz'
Content type 'application/x-gzip' length 516153 bytes (504 KB)
==================================================
downloaded 504 KB
ERROR: dependency ‘caTools’ is not available for package ‘gplots’
* removing ‘/home/u1983390/R/x86_64-pc-linux-gnu-library/3.4/gplots’
The downloaded source packages are in
‘/tmp/Rtmplw9pSu/downloaded_packages’
Warning message:
In install.packages("gplots") :
installation of package ‘gplots’ had non-zero exit status
> install.packages('caTools')
Installing package into ‘/home/u1983390/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning message:
package ‘caTools’ is not available (for R version 3.4.4)
I believe this can be solved by installing a version of caTools compatible with R 3.4.4 following this method. However, I cannot find where older versions of caTools are (I have looked in the CRAN archive).
Would anybody be able to direct me to an earlier version, or does anyone know a different method for instaling gplots?
Cheers,
Jamie

Install error on mxnet

I am trying to install mxnet for use with R Studio on my Windows 10 laptop.
I used these instuctions:
install.packages("drat", repos="https://cran.rstudio.com")
drat:::addRepo("dmlc")
install.packages("mxnet")
But when I try this:
require(mxnet)
I get the error message:
Loading required package: mxnet
Error : object ‘combine_edges’ is not exported by 'namespace:DiagrammeR'
Here is the complete console:
> install.packages("drat", repos = "https://cran.rstudio.com")
Installing package into ‘C:/Users/bill_/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/drat_0.1.2.zip'
Content type 'application/zip' length 73095 bytes (71 KB)
downloaded 71 KB
package ‘drat’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\bill_\AppData\Local\Temp\RtmpIDZk6c\downloaded_packages
> drat:::addRepo("dmlc")
> install.packages("mxnet")
Installing package into ‘C:/Users/bill_/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://dmlc.github.io/drat/bin/windows/contrib/3.3/mxnet_0.7.zip'
Content type 'application/zip' length 5196542 bytes (5.0 MB)
downloaded 5.0 MB
package ‘mxnet’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\bill_\AppData\Local\Temp\RtmpIDZk6c\downloaded_packages
> require(mxnet)
Loading required package: mxnet
Error : object ‘combine_edges’ is not exported by 'namespace:DiagrammeR'
>
Can anyone help?
Thanks in advance.
SOLUTION FOUND PER AXEMAN'S SUGGESTION...
# version 0.9.0 of DiagrammeR won't work with mxnet at this time (20170104)
require(devtools)
install_version("DiagrammeR", version = "0.8.1", repos = "http://cran.us.r-project.org")
With latest repo, you should be able to complete installation. They have removed references to "combine_edges" which was removed from latest DiagrammeR.

there is no package called 'BiocInstaller'

Whenever I try to install a new package I'm getting this error:
source("http://bioconductor.org/biocLite.R")
Warning in install.packages :
package ‘BiocInstaller’ is not available (for R version 3.0.2 RC)
Installing package into ‘/home/hd-master/R/x86_64-unknown-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://www.bioconductor.org/packages/2.13/bioc/src/contrib/BiocInstaller_1.12.0.tar.gz'
Content type 'application/x-gzip' length 13509 bytes (13 Kb)
opened URL
==================================================
downloaded 13 Kb
Error in library(BiocInstaller) :
there is no package called 'BiocInstaller'
Execution halted
Install R-3.0.2 (not RC).
Try starting R as follows: R --vanilla
See if you are pointing to a weird mirror. What is the output of getOption("repos")?
Try this: install.packages("BiocInstaller", repos="http://bioconductor.org/packages/2.13/bioc")

Resources