[SOLVED] Installing RGeostats

Any problem when installing, launching or using RGeostats, on different Operating Systems or Working Environments

[SOLVED] Installing RGeostats

Postby panchovilla » Wed Jul 19, 2017 11:40 am

Bonjour à vous !
Je sollicite votre aide pour installer RGeostats, Merci

After reading topics related to how to install and load the package, here are different attempts that failed...temporarily (hopefully !)


(1) Installing from the Terminal:

Last login: Wed Jul 19 10:59:45 on console
lhos-mbp:~ lho$ cd Desktop
lhos-mbp:Desktop lho$ R CMD INSTALL RGeostats_11.0.5_macosx.tgz -l /Library/Frameworks/R.framework/Resources/library/
* installing *binary* package ‘RGeostats’ ...
* DONE (RGeostats)
lhos-mbp:Desktop lho$

(2) Installing Manually into the R library, [/Library/Frameworks/R.framework/Resources/library/]:

Le chargement a nécessité le package : Rcpp

Error in dyn.load(file, DLLpath = DLLpath, ...) :
impossible de charger l'objet partagé '/Users/lho/Desktop/RGeostats_Here/RGeostats/libs/RGeostats.so':
dlopen(/Users/lho/Desktop/RGeostats_Here/RGeostats/libs/RGeostats.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib
Referenced from: /Users/lho/Desktop/RGeostats_Here/RGeostats/libs/RGeostats.so
Reason: image not found

De plus : Warning message:
le package ‘Rcpp’ a été compilé avec la version R 3.3.2
Erreur : le chargement du package ou de l'espace de noms a échoué pour ‘RGeostats’

# or library(RGeostats,lib.loc="RGeostats_Here"):


Error in dyn.load(file, DLLpath = DLLpath, ...) :
impossible de charger l'objet partagé '/Users/lho/Desktop/RGeostats_Here/RGeostats/libs/RGeostats.so':
dlopen(/Users/lho/Desktop/RGeostats_Here/RGeostats/libs/RGeostats.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib
Referenced from: /Users/lho/Desktop/RGeostats_Here/RGeostats/libs/RGeostats.so
Reason: image not found
Erreur : le chargement du package ou de l'espace de noms a échoué pour ‘RGeostats’

Notice the following informations:

getwd()
[1] "/Users/lho/Desktop"
> R.Version()$platform
[1] "x86_64-apple-darwin13.4.0"
> R.Version()$version.string
[1] "R version 3.3.1 (2016-06-21)"
> packageVersion("Rcpp")
[1] ‘0.12.12’
> packageVersion("RGeostats")
Error in packageVersion("RGeostats") : package ‘RGeostats’ introuvable
> packageVersion("maps")
[1] ‘3.2.0’
> packageVersion("mapproj")
[1] ‘1.2.5’
> for (trgo_ in ls(all.names=T)) { print(trgo_); print(class(eval(parse(text=trgo_)))); cat("\n") }; rm(trgo_)
>
panchovilla
 
Posts: 6
Joined: Mon Jul 17, 2017 9:18 pm

Re: Installing RGeostats

Postby Fabien Ors » Wed Jul 19, 2017 3:18 pm

Bonjour !
Merci d'utiliser RGeostats et bienvenu sur le forum ;o)

Could you tell us more about what you call "(2) Installing Manually into the R library" ?
And why do you need another way to install (twice ?) RGeostats package ?

Because:
  • Once you have successfully installed RGeostats by using the following command*:
    Code: Select all
    R CMD INSTALL RGeostats_11.0.5_macosx.tgz
  • You should only need to load the package under R prompt by using the command:
    Code: Select all
    library("RGeostats")
* if you don't have root permissions, you should use the -l option in the first command to indicate a directory where you have write permissions (for example):
Code: Select all
R CMD INSTALL RGeostats_11.0.5_macosx.tgz -l ~/RGeostats_Here


If you still experience some trouble, please try to uninstall RGeostats package (by using remove.package R command for example) and reinstall it using the "Terminal" procedure.

Hope this helps,

Best regards
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm

Re: Installing RGeostats

Postby panchovilla » Wed Jul 19, 2017 5:28 pm

Hi Fabien
Thank you for your answer!
Sorry if my first post was unclear

In the previous post, I have just listed the unsuccessful attempts (x3) to install the RGeostats package and the corresponding R outputs:

(1) First, I used the Terminal commands that led to the following positive message:
* installing *binary* package ‘RGeostats’ ...
* DONE (RGeostats)
and then
library(RGeostats)


(2) The second way (I named manually) corresponded to a double clic on the RGeostats_11.0.5_macosx.tgz zipped package in order to release the RGeostats in the right repertory in R (which is /Library/Frameworks/R.framework/Resources/library/ ).

And then
library(RGeostats)

(3) At last, the ultimate attempt was :

library(RGeostats, lib.loc="RGeostats_Here)

Finally, all the ways led to the same R outputs as mentioned in the previous post.

Hope this time the post is helpful

Also, following your advice I removed and re-installed the package but I still record the same R failure

best regards
panchovilla
 
Posts: 6
Joined: Mon Jul 17, 2017 9:18 pm

Re: Installing RGeostats

Postby Fabien Ors » Thu Jul 20, 2017 8:08 am

Ok. Thank you for clarifications.

I'm not an expert with R under Mac OS but I think that the two last attempts are not the correct way to install an R package.
(2) You should not extract the archive content by your own. You should let R do it for you by using R CMD INSTALL or install.packages
(3) Loading an R package with the library command is possible only for packages wich are previously installed. The lib.loc argument indicates that the package you want to load is not installed in the standard R library folder.

So, did you try the two operations I mentionned in my previous message ?

1. Under a Terminal:
Code: Select all
R CMD INSTALL RGeostats_11.0.5_macosx.tgz

2. Under an R console
Code: Select all
library("RGeostats")
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm

Re: Installing RGeostats

Postby panchovilla » Thu Jul 20, 2017 12:48 pm

Hi Fabien
Yes I did
See below an other attempt.
Post scriptum: The only thing that works from the beginning of my tries is the R command
Help(package=RGeostats).

Terminal:
lho$ R CMD INSTALL RGeostats_11.0.5_macosx.tgz
* installing to library ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library’
* installing *binary* package ‘RGeostats’ ...
* DONE (RGeostats)

R session:

>library(RGeostats)

Error in dyn.load(file, DLLpath = DLLpath, ...) :
impossible de charger l'objet partagé '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RGeostats/libs/RGeostats.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RGeostats/libs/RGeostats.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/RGeostats/libs/RGeostats.so
Reason: image not found
Erreur : le chargement du package ou de l'espace de noms a échoué pour ‘RGeostats’
panchovilla
 
Posts: 6
Joined: Mon Jul 17, 2017 9:18 pm

Re: Installing RGeostats

Postby Fabien Ors » Fri Jul 21, 2017 5:10 pm

I have no clue now. Sorry.
Maybe the new RGeostats release (soon published) will fix this issue?
I continue investigating and I will let you know if I have found a workaround.
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm

Re: Installing RGeostats

Postby panchovilla » Sat Jul 22, 2017 12:34 am

In order to check what is going on with the file "RGeostats.so" I wrote the following command:

Terminal:
R CMD otool -L /Library/Frameworks/R.framework/Resources/library/RGeostats/libs/RGeostats.so

which corresponds to discover Dynamic library dependency for the "RGeostats.so" file (Note that otool -L in MacOS-unix corresponds to ldd in linux)

Here is what I get:

/Library/Frameworks/R.framework/Resources/library/RGeostats/libs/RGeostats.so:
RGeostats.so (compatibility version 0.0.0, current version 0.0.0)
/Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib (compatibility version 3.1.0, current version 3.1.2)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.44.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
lhos-mbp:/ lho$

Hope it makes sense for you.

Also, according to the lines above, Is it normal to obtain: "RGeostats.so (compatibility version 0.0.0, current version 0.0.0)" ?

Thank you
best regards

Post Scriptum: j'ai eu l'opportunité d'utiliser RGeos il y a environs 3 ans et cela fonctionnait bien mais aujourd'hui même RGeos engendre les mêmes message d'erreur.
I hope the release of the new version will soon remedy the problem. I cross my fingers !
panchovilla
 
Posts: 6
Joined: Mon Jul 17, 2017 9:18 pm

Re: Installing RGeostats

Postby panchovilla » Sat Jul 22, 2017 2:33 pm

Bonjour Fabien
Just to help to understand what is going on.
Actually, RGeos is loading with an older version of R :

R version 3.0.1 (2013-05-16) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin10.8.0 (64-bit)
[R.app GUI 1.61 (6492) x86_64-apple-darwin10.8.0]

[Historique recherché depuis /Users/LHO/.Rapp.history]

> library(RGeoS, lib.loc="RGeoS_Here")
Loading RGeoS - Version:9.1.10
> gridEN<-db.create(flag.grid=T,x0=c(409,5857), dx=c(1,1), nx=c(41,33))
>

Best regards
panchovilla
 
Posts: 6
Joined: Mon Jul 17, 2017 9:18 pm

Re: Installing RGeostats

Postby panchovilla » Sun Jul 23, 2017 3:48 pm

Hi Fabien

Just to mention that RGeostats_11.0.5_macosx.tgz works well with the R_3.1.3 version.

Best regards
panchovilla
 
Posts: 6
Joined: Mon Jul 17, 2017 9:18 pm

Re: Installing RGeostats

Postby Fabien Ors » Tue Aug 01, 2017 9:36 am

Dear,
Did the last release of RGeostats 11.0.6 fixed your issue ?
Regards
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm

Next

Return to Installing RGeostats

Who is online

Users browsing this forum: No registered users and 3 guests

cron