[SOLVED] Cannot load package

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

[SOLVED] Cannot load package

Postby radillon » Tue Aug 08, 2017 7:57 pm

Hi,

I cannot get RGeostats to load. Below is the code I execute to load the package and the error checking code. I've tried deleting this version of the package, and installing a previous version that I was working fine with before, but get the same message regardless of version.

Code: Select all
> install.packages("C:/Users/dillon.361/AppData/Local/Temp/RGeostats_11.0.6.zip", repos = NULL, type = "win.binary")
package ‘RGeostats’ successfully unpacked and MD5 sums checked
> library(RGeostats)
Loading RGeostats - Version:11.0.6
Error : .onAttach failed in attachNamespace() for 'RGeostats', details:
  call: projdef$active
  error: object of type 'closure' is not subsettable
Error: package or namespace load failed for ‘RGeostats’
> getwd()
[1] "C:/Users/dillon.361/Documents"
> R.Version()$platform
[1] "x86_64-w64-mingw32"
> R.Version()$version.string
[1] "R version 3.3.3 (2017-03-06)"
> packageVersion("Rcpp")
[1] ‘0.12.12’
> packageVersion("RGeostats")
[1] ‘11.0.6’
> 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_)
[1] ".Random.seed"
[1] "integer"

[1] "Acton"
[1] "data.frame"

[1] "AlumCreek"
[1] "data.frame"

[1] "April21"
[1] "data.frame"

[1] "April26"
[1] "data.frame"

[1] "Aug1"
[1] "data.frame"

[1] "bar"
[1] "function"

[1] "BurrOak"
[1] "data.frame"

[1] "Chaoblength"
[1] "data.frame"

[1] "count1"
[1] "numeric"

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

[1] "Data"
[1] "data.frame"

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

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

[1] "fish1"
[1] "character"

[1] "Hoover"
[1] "data.frame"

[1] "June6"
[1] "data.frame"

[1] "June7"
[1] "data.frame"

[1] "Lower.Bound"
[1] "numeric"

[1] "Lower.Bound.Original"
[1] "numeric"

[1] "May24"
[1] "data.frame"

[1] "Model"
[1] "aov" "lm"

[1] "nueston"
[1] "data.frame"

[1] "TSalum"
[1] "data.frame"

[1] "Upper.Bound"
[1] "numeric"

[1] "Upper.Bound.Original"
[1] "numeric"
radillon
 
Posts: 5
Joined: Wed Oct 05, 2016 5:38 pm

Re: cannot load package

Postby Fabien Ors » Tue Aug 22, 2017 12:59 pm

Dear,
I think that the problem comes from your current workspace variables.
Please, could you try to rename the variables "data", "Data" and "data.frame" from your workspace by using different names less generics?
Hope this helps,
Best regards.
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm

Re: cannot load package

Postby Fabien Ors » Tue Aug 22, 2017 1:01 pm

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

Re: cannot load package

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

Dear.
A workaround has been found to the problem about the 'closure' error:
Please have a look to the workaround here while waiting for the next RGeostats version which will fix this issue.
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm

Re: cannot load package

Postby radillon » Fri Sep 08, 2017 3:24 pm

Hi Fabien,

Thanks for the replies. The workaround you suggested worked for getting RGeostats to actually load, however I have the same problem as Jennifer when I try to use the polygon.create function.

Code: Select all
poly.data_Acton_LL <- polygon.create(x = as.data.frame(A4@coords))
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


I made sure to upgrade to the latest version of RGeostats that you linked to in your reply to Jennifer. Just like her, this code had worked in the past.

Please advise.

Thanks
radillon
 
Posts: 5
Joined: Wed Oct 05, 2016 5:38 pm

Re: cannot load package

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

The new RGeostats version 11.1.2 fixes the closure error when using projection:
viewtopic.php?f=2&t=390
The polygon.create function has been fixed in RGeostats 11.1.1
I put 'SOLVED' at this topic but, please, let us know (in a new topic), if you still experience some troubles.
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm


Return to Installing RGeostats

Who is online

Users browsing this forum: No registered users and 1 guest

cron