unable to install ggraph package in r - r

I was trying to install ggraph but is faced with this error. May i know how can i overcome this error? I updated ggplot to 3.0.0 but still the error persists.
Error: package or namespace load failed for 'ggraph':
object 'nest_legacy' is not exported by 'namespace:tidyr'
Traceback:
1. library(ggraph)
2. tryCatch({
. attr(package, "LibPath") <- which.lib.loc
. ns <- loadNamespace(package, lib.loc)
. env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
. }, error = function(e) {
. P <- if (!is.null(cc <- conditionCall(e)))
. paste(" in", deparse(cc)[1L])
. else ""
. msg <- gettextf("package or namespace load failed for %s%s:\n %s",
. sQuote(package), P, conditionMessage(e))
. if (logical.return)
. message(paste("Error:", msg), domain = NA)
. else stop(msg, call. = FALSE, domain = NA)
. })
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
6. stop(msg, call. = FALSE, domain = NA)

Related

i want to install package "magick" in r (jupyter), but i doesn't work

error
install.package is fine.
But when i write library(magick), i get this error.
I don't understand why it doesn't install.
Another library's works fine.
=====
i write:
install.packages("magick")
library(magick)
i get:
Error: package or namespace load failed for ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/srv/rlibs/magick/libs/magick.so':
libMagick++-6.Q16.so.7: cannot open shared object file: No such file or directory
Traceback:
1. library(magick)
2. tryCatch({
. attr(package, "LibPath") <- which.lib.loc
. ns <- loadNamespace(package, lib.loc)
. env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
. }, error = function(e) {
. P <- if (!is.null(cc <- conditionCall(e)))
. paste(" in", deparse(cc)[1L])
. else ""
. msg <- gettextf("package or namespace load failed for %s%s:\n %s",
. sQuote(package), P, conditionMessage(e))
. if (logical.return && !quietly)
. message(paste("Error:", msg), domain = NA)
. else stop(msg, call. = FALSE, domain = NA)
. })
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
stop(msg, call. = FALSE, domain = NA)

There is no package called 'foreign'

I'm trying to install the package 'Hmisc' in R but I'm running into an error, shown below:
Error: package or namespace load failed for 'Hmisc' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called 'foreign'
Traceback:
1. library(Hmisc)
2. tryCatch({
. attr(package, "LibPath") <- which.lib.loc
. ns <- loadNamespace(package, lib.loc)
. env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
. }, error = function(e) {
. P <- if (!is.null(cc <- conditionCall(e)))
. paste(" in", deparse(cc)[1L])
. else ""
. msg <- gettextf("package or namespace load failed for %s%s:\n %s",
. sQuote(package), P, conditionMessage(e))
. if (logical.return)
. message(paste("Error:", msg), domain = NA)
. else stop(msg, call. = FALSE, domain = NA)
. })
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
6. stop(msg, call. = FALSE, domain = NA)
I've looked around and can't seem to find any answers.

How to adjust Jupyter Notebook "R" error?

I'm getting the below error when trying to import library & I'm using R in Jupyter Notebook.
library(ggpubr)
Warning message:
"package 'ggpubr' was built under R version 3.6.3"
Error: package or namespace load failed for 'ggpubr' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace 'rlang' 0.4.2 is already loaded, but >= 0.4.5 is required
Traceback:
1. library(ggpubr)
2. tryCatch({
. attr(package, "LibPath") <- which.lib.loc
. ns <- loadNamespace(package, lib.loc)
. env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
. }, error = function(e) {
. P <- if (!is.null(cc <- conditionCall(e)))
. paste(" in", deparse(cc)[1L])
. else ""
. msg <- gettextf("package or namespace load failed for %s%s:\n %s",
. sQuote(package), P, conditionMessage(e))
. if (logical.return)
. message(paste("Error:", msg), domain = NA)
. else stop(msg, call. = FALSE, domain = NA)
. })
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
6. stop(msg, call. = FALSE, domain = NA)
I have tried the below codes to adjust it ,But it didn't workout
remove.packages("ggpubr")
&
install.packages("ggpubr")
&
update.packages(Yes)

R *** caught segfault *** address 0x18, cause 'memory not mapped

I am running a pipeline that uses R on terminal to run a script:
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.3
I suddenly get this error. I have checked other users errors and tried to uninstall and install the packages using
ip <- installed.packages() pkgs.to.remove <- ip[!(ip[,"Priority"] %in%
c("base", "recommended")), 1] sapply(pkgs.to.remove, remove.packages)
but it does not work and I keep having the same error. Could you give me a hand trying to guess how I could fix this?
many thanks
EC
*** caught segfault ***
address 0x18, cause 'memory not mapped'
Traceback:
1: dyn.load(file, DLLpath = DLLpath, ...)
2: library.dynam(lib, package, package.lib)
3: loadNamespace(package, lib.loc)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch({ attr(package, "LibPath") <- which.lib.loc ns <- loadNamespace(package, lib.loc) env <- attachNamespace(ns, pos = pos, deps)}, error = function(e) { P <- if (!is.null(cc <- conditionCall(e))) paste(" in", deparse(cc)[1L]) else "" msg <- gettextf("package or namespace load failed for %s%s:\n %s", sQuote(package), P, conditionMessage(e)) if (logical.return) message(paste("Error:", msg), domain = NA) else stop(msg, call. = FALSE, domain = NA)})
8: library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc, quietly = quietly)
9: .getRequiredPackages2(pkgInfo, quietly = quietly)
10: library(DESeq2)
11: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage"))
12: suppressPackageStartupMessages({ library(DESeq2)})
An irrecoverable exception occurred. R is aborting now ...
'Rscript /Users/user1/samsa2/R_scripts/run_DESeq_stats.R -I /Volumes/ECG_WORK/JC150_T0/results/step_5_output/RefSeq_results/org_results -O RefSeq_org_DESeq_results.tab -R /Volumes/ECG_WORK/JC150_T0/results/step_2_output/raw_counts.txt' exited with non-zero status 139

can't load ggmap package in jupyter

I used conda install -c vfonov r-ggmap to install ggmap package. When I tried to load the package in Jupyter notebook, I got the following error:
Error: package or namespace load failed for ‘ggmap’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/anaconda3/lib/R/library/jpeg/libs/jpeg.so':
dlopen(/anaconda3/lib/R/library/jpeg/libs/jpeg.so, 6): Library not loaded: #rpath/libjpeg.9.dylib
Referenced from: /anaconda3/lib/R/library/jpeg/libs/jpeg.so
Reason: Incompatible library version: jpeg.so requires version 13.0.0 or later, but libjpeg.9.dylib provides version 12.0.0
Traceback:
1. library(ggmap)
2. tryCatch({
. attr(package, "LibPath") <- which.lib.loc
. ns <- loadNamespace(package, lib.loc)
. env <- attachNamespace(ns, pos = pos, deps)
. }, error = function(e) {
. P <- if (!is.null(cc <- conditionCall(e)))
. paste(" in", deparse(cc)[1L])
. else ""
. msg <- gettextf("package or namespace load failed for %s%s:\n %s",
. sQuote(package), P, conditionMessage(e))
. if (logical.return)
. message(paste("Error:", msg), domain = NA)
. else stop(msg, call. = FALSE, domain = NA)
. })
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
6. stop(msg, call. = FALSE, domain = NA)
I appreciate any help.
The solution is surprisingly easy.
conda install -c conda-forge jpeg
done.

Resources