There is a error while loading the library gmodels - r

> install.packages("gmodels",dependencies = TRUE)
Installing package into ‘C:/Users/OmPrakash/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/gmodels_2.16.2.zip'
Content type 'application/zip' length 74193 bytes (72 KB)
downloaded 72 KB
package ‘gmodels’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in :
C:\Users\OmPrakash\AppData\Local\Temp\RtmpO6JFcq\downloaded_packages
> library(gmodels)
Error: package or namespace load failed for ‘gmodels’ in library.dynam(lib, package, package.lib):
DLL ‘gtools’ not found: maybe not installed for this architecture?

It seems like gtools is not well installed.
You should try manually installing it.
Colin

Related

Dependency limma not available when installing MKmisc package

When installing this package in R 4.2.1
install.packages("MKmisc")
I have this output
Installing package into ‘C:/Users/blahblah/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘limma’ is not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/MKmisc_1.8.zip'
Content type 'application/zip' length 769544 bytes (751 KB)
downloaded 751 KB
package ‘MKmisc’ successfully unpacked and MD5 sums checked
It does not work as we need to download the package limma so let's do it
install_github("cran/limma")
However it gives an error and the MKmisc package is still not working
What should I do to handle this problem?
"limma" can be installed using BiocManager.
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("limma")
install.packages("MKmisc")
# * DONE (MKmisc)
# The downloaded source packages are in
# ‘/tmp/Rtmphwh6rY/downloaded_packages’

Error loading tidyverse after fresh install - R (loadNamespace, broom, backports)

I just updated R to version 4.0.2 and updated RStudio Desktop to version 1.3.959. As seen in the code below, I am unable to load tidyverse after what appears to be a successful installation. However, data.table installs and loads perfectly fine. Does anyone have experience with this? Thanks!
Code from console (tidyverse error):
> install.packages('tidyverse')
Installing package into ‘C:/Users/iangm/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
also installing the dependencies ‘RColorBrewer’, ‘scales’, ‘dplyr’, ‘ggplot2’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/RColorBrewer_1.1-2.zip'
Content type 'application/zip' length 55583 bytes (54 KB)
downloaded 54 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/scales_1.1.1.zip'
Content type 'application/zip' length 560984 bytes (547 KB)
downloaded 547 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/dplyr_1.0.0.zip'
Content type 'application/zip' length 1302777 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/ggplot2_3.3.2.zip'
Content type 'application/zip' length 4068169 bytes (3.9 MB)
downloaded 3.9 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440050 bytes (429 KB)
downloaded 429 KB
package ‘RColorBrewer’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘ggplot2’ successfully unpacked and MD5 sums checked
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\iangm\AppData\Local\Temp\RtmpkNazQW\downloaded_packages
> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: loadNamespace(name)
error: there is no package called ‘backports’
Code from console (data.table success):
> install.packages('data.table')
Installing package into ‘C:/Users/iangm/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/data.table_1.12.8.zip'
Content type 'application/zip' length 2325868 bytes (2.2 MB)
downloaded 2.2 MB
package ‘data.table’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\iangm\AppData\Local\Temp\RtmpkNazQW\downloaded_packages
> library(data.table)
data.table 1.12.8 using 2 threads (see ?getDTthreads). Latest news: r-datatable.com
There can be some problem with package backports: try to reinstall that package and load tidyverse again:
install.packages("backports")
library(tidyverse)
If that doesn't work, there might be problem with packages built under an earlier major version of R (i.e. 3.x). Try reinstalling all the packages with:
update.packages(ask = FALSE, checkBuilt = TRUE)
See more info here:
Is there a way to automate reinstalling packages and their dependencies in r?

package or namespace load failure

I don't know what happened but this NAMESPACE LOAD FAILURE is coming every time I call the forecast package.
So I have used this line of code
install.packages("forecast",repos = c("http://rstudio.org/_packages",
"http://cran.rstudio.com"))
This was the console message that I got after running this code
Installing package into ‘C:/Users/adarsh/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository
http://rstudio.org/_packages/bin/windows/contrib/3.5:
cannot open URL
'http://rstudio.org/_packages/bin/windows/contrib/3.5/PACKAGES'
There is a binary version available but the
source version is later:
binary source needs_compilation
forecast 8.6 8.7 TRUE
Binaries will be installed
trying URL
'http://cran.rstudio.com/bin/windows/contrib/3.5/forecast_8.6.zip'
Content type 'application/zip' length 2345112 bytes (2.2 MB)
downloaded 2.2 MB
package ‘forecast’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\adarsh\AppData\Local\Temp\RtmpQ58pju\downloaded_packages
I checked whether this was also the case with other packages.
install.packages("tseries")
Installing package into ‘C:/Users/adarsh/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘quadprog’ is not available
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tseries_0.10-46.zip'
Content type 'application/zip' length 414767 bytes (405 KB)
downloaded 405 KB
package ‘tseries’ successfully unpacked and MD5 sums checked**
**The downloaded binary packages are in
C:\Users\adarsh\AppData\Local\Temp\RtmpQ1vu1H\downloaded_packages**
library(tseries)
Error: package or namespace load failed for ‘tseries’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘quadprog’
In addition: Warning message:
package ‘tseries’ was built under R version 3.5.3
Same error happened again. Please anyone help me.
I downloaded the " quadprog " package from the cran repository and saved it as zip file at C://Users/yourname/Documents/package_file.zip .
Then used the option Package Archive File (.zip; .tar.gz) in R studio and installed the above package.
Thank you

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.

Unable to load packages

I was trying to install lubridate package but cannot manage to load it to my library
Here are the errors I got.
install.packages("lubridate")
Installing package into ‘C:/Users/YingHaw/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/lubridate_1.3.3.zip'
Content type 'application/zip' length 664643 bytes (649 KB)
opened URL
downloaded 649 KB
package ‘lubridate’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\YingHaw\AppData\Local\Temp\Rtmp4KMRy3\downloaded_packages
library(lubridate)
Error in get(Info[i, 1], envir = env) :
cannot open file 'C:/Users/YingHaw/Documents/R/win-library/3.1/Rcpp/R/Rcpp.rdb': No such file or directory
Error: package or namespace load failed for ‘lubridate’
I don't understand why I am having this problem.

Resources