[SOLVED] 2015, 2016, Rgeostats versions and pb encountered

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

[SOLVED] 2015, 2016, Rgeostats versions and pb encountered

Postby Jennifer Doyle » Tue Sep 05, 2017 12:49 pm

Hi.
The following is text from 2015 Rmarkdown document where Rgeostats worked fine,
"This markdown document contains the full kriging procedue for the Aran ground from 2002 to 2015. The area of the ground has been revised based on the most recent data.
I am using R version 3.1.2 (2014-10-31). First we load the required packages.
library(RGeostats)
library(maps)
library(mapproj)
library(fields)
Now to check the versions of the different packages:
Package
Version
RGeostats 10.0.8
Rcpp 0.11.5
maps 2.3-9
mapproj 1.2-2
fields 8.2-1/,k,l/. "

In 2016 I got the following warning when I used Rmarkdown and the following text from that document
"2016-09-15
This markdown documment contains the full kriging procedue for the Aran ground from 2002 to 2015. The area of the ground has been revised based on the most recent data.
I am using R version 3.3.1 (2016-06-21). First we load the required packages.
library(RGeostats)
library(maps)
library(mapproj)
library(fields)Now to check the versions of the different packages:
Package Version
RGeostats 11.0.3
Rcpp 0.12.6
maps 3.1.1
mapproj 1.2-4
fields 8.4-1/,k,l/.
The error is more a warning and yet the kriging process worked.
Here is the error: this warning occurred at all stages of the process.
## Warning in `[<-`(`*tmp*`, iset, value = list(<S4 object of class
## structure("polyset", package = "RGeostats")>)): implicit list embedding of
## S4 objects is deprecated"

In 2017
When I run the same code and packages as above I get this error.
So I cannot proceed with the kriging process.
is.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4'
Hide Traceback
Error in projdef$orientation : object of type 'closure' is not subsettable
2.
projec0.save(active = TRUE, projection = projection, parameters = parameters, orientation = orientation)
1.
projec.define(projection = "mean", db = data.db)


It is strange that the new versions of Rgeostats are giving warnings in 2016 and not working -projection failing in 2017 when I run the code.

We would like to know what is the problem and solution please as we prefer to have an R markdown kriging process for reproducibility for our research.

Now I want to revert back to the earlier version of RGeostats(10.0.8 ).
But now I get this error in the code:
Geoslib 10.1.4 - Dec, 3rd 2014

Problem with the Geoslib License
================================
You must register a valid License for Geoslib!
To identify yourself, please carefully note the activation code:

xxxxx

In case of problem, please contact: rgeostats@geosciences.mines-paristech.fr

You can generate your License File from the site:
http://rgeostats.free.fr/form.php
You will automatically receive the license file by email.
(If no mail arrives, please check your JUNK mail or SPAMs)

When you receive a valid License File:
- place it into your favorite location on disk
(no special characters into the path)
- use the command license.define()

Failed to load RGeostats - Version: 10.0.8

And when I try to generate License file – website tells me it is free and I am registered already on the forum.So how can I re-activate the old package please?

Thank you
Apologies for the long post.
JD
Jennifer Doyle
 
Posts: 5
Joined: Mon Apr 27, 2015 11:26 am

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Fabien Ors » Tue Sep 05, 2017 3:22 pm

Dear Jennifer,

There is no more possibility to obtain a valid license file for older versions of RGeostats < v11.
We strongly suggest to use recent versions of RGeostats as a lot of serious bugs have been fixed since that time.
Please, have a look to the CHANGELOG file for more details.

The error "object of type 'closure' is not subsettable" is due to an incompatibility between current version of RGeostats and mapproj packages.
I think that we will be able to fix this major issue in the next version of RGeostats.

Meanwhile, I strongly recommand you to not use mapproj package in your Rmarkdown document by removing the instruction "load(mapproj)".

But, if you need to use projection in your script, you can use this temporary workaround by adding the following instruction after "load(mapproj)" line.
(to be removed in the future once this bug will be fixed in RGeostats)
Code: Select all
.Last.projection=list(active=F,projection="mean",parameters=NULL,orientation=NULL)
Fabien Ors
Administrateur du site
 
Posts: 150
Joined: Thu Sep 20, 2012 1:07 pm

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Jennifer Doyle » Wed Sep 06, 2017 11:06 am

Hi Fabien.
Thanks for your reply.
I would prefer to use the latest version of course!
When I do not load mapproj - Rgeos code then fallovers at:
poly <- polygon.create(x=pol.FU2021$x,y=pol.FU2021$y)
Error in if (inter != which(is.na(y))) stop0("Arguments 'x' and 'y' should have the same set of 'NA'") :
argument is of length zero.

When I do the workaround as you suggestRgeos code then fallovers at:
poly <- polygon.create(x=pol.FU2021$x,y=pol.FU2021$y)
Error in if (inter != which(is.na(y))) stop0("Arguments 'x' and 'y' should have the same set of 'NA'") :
argument is of length zero.

Below are the outputs as I have tried running the code again with the workaround and it still gives me the error:
(is.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4'
Parameters for projection
-------------------------
Projection is switched ON
Use 'projec.define' to modify previous values
> projec.toggle(mode=0)
> plot(data.db,title=mt)
NAs introduced by coercion):

Any more advice please?
Regards J

> getwd()
[1] "N:/Surveys/UWTV SURVEYS FU2022 CELTIC SEA/2017 Labadie/Kriging"
> R.Version()$platform
[1] "i386-w64-mingw32"
> R.Version()$version.string
[1] "R version 3.3.1 (2016-06-21)"
> packageVersion("Rcpp")
[1] ‘0.12.6’
> packageVersion("RGeostats")
[1] ‘11.0.6’
> packageVersion("maps")
[1] ‘3.1.1’
> packageVersion("mapproj")
[1] ‘1.2.4’
> for (trgo_ in ls(all.names=T)) { print(trgo_); print(class(eval(parse(text=trgo_)))); cat("\n") }; rm(trgo_)
[1] ".Last.projection"
[1] "list"

[1] ".Last.variety"
[1] "list"

[1] ".Random.seed"
[1] "integer"

[1] "channel"
[1] "RODBC"

[1] "nep"
[1] "data.frame"

[1] "nep.all"
[1] "data.frame"
Jennifer Doyle
 
Posts: 5
Joined: Mon Apr 27, 2015 11:26 am

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Jennifer Doyle » Wed Sep 06, 2017 11:34 am

Hi Fabien
I can send you the r.data for this if would be of any help!
Thanks again Jennifer
Jennifer Doyle
 
Posts: 5
Joined: Mon Apr 27, 2015 11:26 am

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Fabien Ors » Wed Sep 06, 2017 12:45 pm

Hi Jennifer.
Great ! The mapproj workaround is the solution for the "closure" error.

Then, for the polygon.create error, I suggest you to really use the last version of RGeostats :-)
Please, download it by clicking here: viewtopic.php?f=2&t=385
The function polygon.create has been modified recently in order to handle NA correctly!

If the problem remains with RGeostats 11.1.1, I would like to know the results of the following commands, please:
Code: Select all
class(pol.FU2021$x)
class(pol.FU2021$y)
Fabien Ors
Administrateur du site
 
Posts: 150
Joined: Thu Sep 20, 2012 1:07 pm

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Jennifer Doyle » Wed Sep 06, 2017 3:05 pm

Hi Fabien.
I am using R version 3.3.1 (2016-06-21). First we load the required packages.
library(RGeostats)
library(maps)
#library(mapproj)
#.Last.projection=list(active=F,projection="mean",parameters=NULL,orientation=NULL)
library(fields)
Now to check the versions of the different packages:
Package Version
RGeostats 11.1.1
Rcpp 0.12.6
maps 3.1.1
mapproj 1.2-4
fields 8.4-1/,k,l/.

First I ran the Rgeostats code without loading the mapproj as below this resulted in:
is.na() applied to non-(list or vector) of type 'S4'is.na() applied to non-(list or vector) of type 'S4' when run code: projec.define(projection="mean",db=data.db)
Then when run this:
> plot(data.db,title=mt)
NAs introduced by coercion.

Then after polygon data created ... I get errors when run this
> plot(data.db,main=mt, add=T)
NAs introduced by coercionNAs introduced by coercion

> class(pol.FU2021$x)
[1] "numeric"
> class(pol.FU2021$y)
[1] "numeric"
NAs introduced by coercionNAs introduced by coercion

I ran the code to the end of the script - gave me an answer but because it routinely throws up the hen I run the variogram, gridding, CVV calculations etc
is.na() applied to non-(list or vector) of type 'S4'
is.na() applied to non-(list or vector) of type 'S4'
is.na() applied to non-(list or vector) of type 'S4'
is.na() applied to non-(list or vector) of type 'S4'
NAs introduced by coercion
NAs introduced by coercion
NAs introduced by coercion
NAs introduced by coercion
NAs introduced by coercion
NAs introduced by coercion
NAs introduced by coercion
NAs introduced by coercion
implicit list embedding of S4 objects is deprecated
implicit list embedding of S4 objects is deprecated

I want to be certain that these errors are not influencing the final results of the analysis.

Any more advice greatly appreciated.
Thanks again Jennifer
Jennifer Doyle
 
Posts: 5
Joined: Mon Apr 27, 2015 11:26 am

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Fabien Ors » Wed Sep 06, 2017 3:36 pm

Dear Jennifer,
If you still want to use projec.define function in your script, you should continue to load mappproj package and use the suggested workaround by creating the .Last.projection object. So try to uncomment this please:
Code: Select all
library(mapproj)
.Last.projection=list(active=F,projection="mean",parameters=NULL,orientation=NULL)


Then, if the problem remains, could you send me by email your .rData file and the script you are running ?
Cheers
Fabien Ors
Administrateur du site
 
Posts: 150
Joined: Thu Sep 20, 2012 1:07 pm

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Jennifer Doyle » Wed Sep 06, 2017 4:32 pm

Hi Fabien.
Just tried that as your suggested below - the workaround.
And still get the errors.
What email will I send .rData file and the script to please?
Thanks again for your efforts.
Regards J
Jennifer Doyle
 
Posts: 5
Joined: Mon Apr 27, 2015 11:26 am

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Fabien Ors » Wed Sep 06, 2017 4:40 pm

rgeostats[at]geosciences.mines-paristech.fr
Fabien Ors
Administrateur du site
 
Posts: 150
Joined: Thu Sep 20, 2012 1:07 pm

Re: 2015, 2016, 2016 Rgeostats versions and problems encount

Postby Fabien Ors » Fri Sep 29, 2017 1:27 pm

The new RGeostats version 11.1.2 fixes the closure error when using projection:
viewtopic.php?f=2&t=390
Fabien Ors
Administrateur du site
 
Posts: 150
Joined: Thu Sep 20, 2012 1:07 pm

Next

Return to Installing RGeostats

Who is online

Users browsing this forum: No registered users and 0 guests