Can´t load eurostat and sf library - r

So I'm trying to load eurostat and sf librarys and I get this error:
Error: package or namespace load failed for ‘sf’:
.onLoad falhou em loadNamespace() para 'sf', detalhes:
chamada: get(genname, envir = envir)
erro: object 'group_map' not found
I loaded the rgdal package again as some other question that I saw here sugested, but I still get the same error. I also tried to begin a fresh session but no luck
Edit: the eurostat package does the same error

I found out that the error was with the dplyr version that was installed, I needed the 0.8 version

Related

Problem with sf package in R: How can I solve it?

Got the following error message after installing "sf" package in R.
It seems to have something to do with a prior installation of "tmap".
I get the same error message for library(tmap).
R version 4.0.2
install.packages('sf')
library(sf)
Fehler: package or namespace load failed for ‘sf’:
.onLoad in loadNamespace() für 'units' fehlgeschlagen, Details:
Aufruf: udunits_init(file.path(.get_ud_xml_dir(), "udunits2.xml"))
Fehler: Error in function udunits_init: Can't open installed, default, unit database
is there anything I can do? I am completely lost.
After reading several threads, the solution that worked for me was to install and manually load the package udunits2.

error message trying to install homals package in R

I'm trying to install the Homals package - library(homals), but keep getting this error message:
library(homals)
Error : .onLoad failed in loadNamespace() for 'rgl', details: call:
dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared
object
'/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgl/libs/rgl.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgl/libs/rgl.so,
6): Library not loaded: /opt/X11/lib/libGLU.1.dylib Referenced from:
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgl/libs/rgl.so
Reason: image not found Error: package or namespace load failed for
‘homals’
I have a couple of my colleagues to run the same code, the same thing happens. I have re-install R studio to the newest version.
install.packages("rgl")
install.packages("homals")
library(homals)
Any solutions for this? thank you.
I was able to successfully install on both Windows and Mac. I believe the root cause here is that you have R version 3.3 installed when you require at least v3.5.3 as per below:
library(homals)
Warning message:
package ‘homals’ was built under R version 3.5.3

Trouble adding package to library() after installing package

I keep getting the same error, for both first for XLConnect, (which I thought was a java problem) and now rJava (which is also not working). This is the error message I get when I library(rJava):
Error: package or namespace load failed for ‘rJava’: .onLoad failed
in loadNamespace() for 'rJava', details: call: dyn.load(file,
DLLpath = DLLpath, ...) error: unable to load shared object
'/Users/snyderk2/Library/R/3.4/library/rJava/libs/rJava.so':
dlopen(/Users/snyderk2/Library/R/3.4/library/rJava/libs/rJava.so, 6):
Library not loaded: #rpath/libjvm.dylib Referenced from:
/Users/snyderk2/Library/R/3.4/library/rJava/libs/rJava.so Reason:
image not found
I am new to R, and just need to figure out how to get these packages working, thanks!
Try (check your java version and change accordingly):
Sys.setenv(JAVA_HOME = "C:/Program Files/Java/jre-9.0.1")
And then load library.
Install package xlsx if you are trying to access Excel file by entering install.packages("xlsx", dependencies = T) in your console.
Another R package for working with excel data which does not require rJava is openxlsx. I've found it works faster than java-based packages, which is a nice bonus.

R: object ‘set_global_graph_attrs’ is not exported from 'namespace:DiagrammeR'

I wanted to install Mxnet library and found on this forum the topic where was described how do it .
cran <- getOption("repos")
cran["dmlc"] <- "https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/R/CRAN/"
options(repos = cran)
install.packages("mxnet")
library("mxnet")
and then i got the error
Error: package or namespace load failed for ‘mxnet’:
object ‘set_global_graph_attrs’ is not exported from 'namespace:DiagrammeR'
what's wrong?
DiagrammeR library is installed.
There is some weird thing goes with mxnet installation on windows. I also experienced that problem a few days ago. What helped me is to install diagrammeR 0.9 manually:
# Make sure you have devtools installed already
require(devtools)
install_version("DiagrammeR", version = "0.9.0", repos = "http://cran.us.r-project.org")
require(DiagrammeR)
And after doing that, try to install mxnet - now it should work.
Let me know if it helps.
I had exactly the same problem with loading mxnet. Your suggestion of installing DiagrammeR manually seems to have fixed it. Unfortunately, it simply exposed another error.
Error: package or namespace load failed for ‘mxnet’:
.onLoad failed in loadNamespace() for 'mxnet', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/steve/Documents/R/win-library/3.4/mxnet/libs/x64/libmxnet.dll':
LoadLibrary failure: The specified module could not be found.
I think the "onLoad" function must be missing. The dll referenced above, libmxnet.dll, is exactly where it should be.

R error loading package rJava and openNLP

I get this error message while trying to load the rJava or the openNLP packages through the function library(openNLP) or library(rJava):
Error: package or namespace load failed for ‘rJava’:
.onLoad in loadNamespace() for 'rJava' failed, details:
call: dirname(this$RuntimeLib)
error: a character vector argument expected
I have no problems loading other packages, e.g. NLP.
Does somebody know what the problem is?
I have updated the Java SE Development Kit and now I get no error message anymore. So this seems to be the solution for the problem.
I solved this problem by installing Java SE Development Kit 8.
Link for Download: http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html

Resources