Problems with IsoriX

23 views
Skip to first unread message

Chris Baumann

unread,
Feb 29, 2024, 11:02:54 AMFeb 29
to IsoriX
I hope you can help me with my problem:
I worked my way through the tutorial on your bookdown page and got stuck
at the prepraster() command where prepraster(raster = ElevWorld, isofit
= EuropeFit, aggregation_factor = 4) did not work. However, I was able
to fix this with manual_crop = c(-10, 30, 35, 60). With EuropeIsoscape
<- isoscape(raster = ElevEurope, isofit = EuropeFit) something is not
working either
(error message: [1] Building the isoscapes...
[1] (this may take a while)
Error in (function (classes, fdef, mtable) :
   cannot find an inherited method for function 'crds' for signature
'"RasterLayer"'
Timing ended at: 0 0 0).
Maybe it's isofit again? Can you help me with this?

Thank you a lot!

Best,
Chris

Alexandre Courtiol

unread,
Mar 1, 2024, 3:57:40 AMMar 1
to IsoriX
Hi Chris,

I am not certain but the error messages suggest to me that there may be a clash between the various packages installed in your system.
This is not expected unless you have not updated your packages before installing some new ones.

So before digging deeper, please make sure to have one of the latest version of R installed (R >= 4.3.1).
Then, unless you have a good reason not to, please update all your packages: starting from a fresh R session, run:
update.packages(ask = FALSE, checkBuilt = TRUE).
Check for possible error messages and installation failing, if any, do let me know.

Then load IsoriX and try the examples:
library(IsoriX)
options_IsoriX(example_maxtime = 300)
example(isoscape)

This should produce some plots.
I am confident that this should work, but let me know otherwise.

Then try to rerun your workflow.
If that still does not work, at least we will have ruled out a main cause of trouble, and I will continue helping you.

Please let me know how that go.

++

Alex

Corrin Laposki

unread,
Apr 6, 2024, 2:39:55 AMApr 6
to IsoriX
Dear Chris and Alexandre,

Was the issue Chris described ever resolved? I've encountered the exact same issue even after updating R (now running 4.3.3) and all installed packages. 

Thank you both!

Best,
Corrin

Alexandre Courtiol

unread,
Apr 7, 2024, 3:46:52 AMApr 7
to IsoriX
Hi Corrin,

I never heard back from Chris, so I am assuming it worked.

Could you please follow exactly what I wrote, i.e. starting from a fresh R session, run:
update.packages(ask = FALSE, checkBuilt = TRUE).

Check for possible error messages and installation failing, if any, do let me know.

Then load IsoriX and try the examples using:
library(IsoriX)
options_IsoriX(example_maxtime = 300)
example(isoscape)

Let me know then what happens and paste the error messages in your reply.

Thanks,
Alex

chris.b...@googlemail.com

unread,
Apr 9, 2024, 1:53:38 AMApr 9
to iso...@googlegroups.com
Sorry for the late response,
I updated R and all packages, but the problem still remains.

Cheers,
Chris

Am 01.03.2024 um 09:57 schrieb Alexandre Courtiol <alexandre...@gmail.com>:


--
You received this message because you are subscribed to a topic in the Google Groups "IsoriX" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/isorix/0annNoyTNAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to isorix+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isorix/d8bf6ffb-022b-46c1-b58f-50e09e521b32n%40googlegroups.com.

Corrin Laposki

unread,
Apr 9, 2024, 1:54:17 AMApr 9
to iso...@googlegroups.com
Hi Alex,

Thank you for the suggestions. I ran the provided script, and while I was able to generate the example plots, I did encounter the following error messages:

Registered S3 methods overwritten by 'rgl':
  method               from
  knit_print.rglId        
  knit_print.rglOpen3d    
  sew.rglRecordedplot      
Error in dyn.load(dynlib <- getDynlib(dir)) :
  unable to load shared object '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/rgl/libs/rgl.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/rgl/libs/rgl.so, 0x0006): Library not loaded: /opt/X11/lib/libGLU.1.dylib
  Referenced from: <BC4AD942-81A6-3DA1-BCA2-A58F8B31D3A5> /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/rgl/libs/rgl.so
  Reason: tried: '/opt/X11/lib/libGLU.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/X11/lib/libGLU.1.dylib' (no such file), '/opt/X11/lib/libGLU.1.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libGLU.1.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-11.0.18+10/Contents/Home/lib/server/libGLU.1.dylib' (no such file), '/var/folders/pp/ygfh1j8x4tvgw4k2nq8zck6w0000gn/T/rstudio-fallback-library-path-1818471425/libGLU.1.dylib' (no such file)
Error in .build_sphere(x$isoscape[[which]], colours = colours, decor = decor) :
  The package 'rgl' is needed for this function,
    you can install it by typing install.packages('rgl').
In addition: Warning messages:
1: Loading rgl's DLL failed.
This build of rgl depends on XQuartz, which failed to load.
 See the discussion in https://stackoverflow.com/a/66127391/2554330
2: Trying without OpenGL... 

I went over to the stackoverflow discussion outlined in the error message and followed their recommendations, it seemed to fix the rgl package issue. 

However, when working with data I've personally downloaded from WISER, I can get about as far as the prepraster step before I encounter the following error:

> ElevUSA <- prepraster(raster = ElevWorld,
+                       isofit = USAFit,
+                       aggregation_factor = 4)
[1] "cropping..."
Error in .local(x, y, ...) : Cannot get an Extent object from argument y
Timing stopped at: 0.018 0 0.018

As far as I can tell, the data frame produced after the prepsources step is sound, although I do encounter warnings while generating it, I've included a sample below:

In FUN(X[[i]], ...) :
  Some longitude values are not unique but should be, so the first element was taken among: 7.439320571 7.423583333 .

Thank you again for all of the help.

Best,
Corrin

On Sun, Apr 7, 2024 at 3:46 AM Alexandre Courtiol <alexandre...@gmail.com> wrote:

*Message sent from a system outside of UConn.*

--
You received this message because you are subscribed to a topic in the Google Groups "IsoriX" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/isorix/0annNoyTNAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to isorix+un...@googlegroups.com.


--

Corrin Laposki

Ph.D. Candidate

Department of Anthropology

University of Connecticut

354 Mansfield Road

Storrs, CT 06269

Office: Beach Hall, Room 309

Corrin....@uconn.edu

Alexandre Courtiol

unread,
Apr 9, 2024, 2:02:56 AMApr 9
to IsoriX
Hi Chris, hi Corrin,

To solve the issues, I need to be able to reproduce your problem (ideally without you having to send me your data).
So could you please do what I asked above, i.e. run the following (exactly as it is written) in a new R session and post me the output if it fails:

library(IsoriX)
sessionInfo()
options_IsoriX(example_maxtime = 300)
example(prepraster)
example(isoscape)

If that does not fail, we will try to find another series of tests.

Thanks,
Alex

Corrin Laposki

unread,
Apr 10, 2024, 2:26:59 AMApr 10
to IsoriX
Hello Alex,

While nothing failed, I did encounter the following warnings after running what you asked:

Warning message:
In system.time({ :
  The first longitude is greater than the second one. You may want this to study something around the pacific. This feature is not fully supported... but... the function prepraster() tried to cope with this. That implies a change in the coordinate system (0:360 instead of -180:180). This should create no problem for ploting isoscapes but this can create troubles to add polygons or points on the maps. If that is the case, you need to add 360 degree to the longitudes... If all that sounds complicated, just stick to a first longitude SMALLER than the second one.

If you do not see the sphere, run rgl::rglwidget()
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'.

If I can provide any other information, lease let me know. 

Best,
Corrin 

Alexandre Courtiol

unread,
Apr 10, 2024, 2:32:12 AMApr 10
to IsoriX
Hi Corrin,
Those warnings are expected. So it seems that IsoriX is working fine on your system.
The issue could thus be data specific, so please share with me privately (cour...@izw-berlin.de) a dropbox folder or similar with your data and a short and simple script that leads to the errors you are encountering.
I will run the code and see if I can reproduce the problem.
Best,
Alex

Alexandre Courtiol

unread,
Apr 15, 2024, 4:07:47 AMApr 15
to IsoriX
Hi all,

So Corrin sent me some code and upon inspection there was nothing wrong with IsoriX.
I suspect the same to be true for you Chris, but please Chris double check.

Corrin had created some objects using the package raster and then had tried to use them as input of some IsoriX functions.
This cannot work.

It is true that IsoriX used to rely on objects created with the package raster, but it no longer does since version 0.9.1 since it relies on the newer package terra.
In the future, what I could do is check that input of some IsoriX function have not been created with raster and produce meaningful error message.
To avoid such issues, the best is to follow closely the instruction from the official IsoriX documentation (i.e. the bookdown and help files).
It may be that some of the official is wrong, if that turn out to be the case, I will of course fix that immediately.
For more details about why IsoriX no longer work with raster, please check earlier posts from this list.

Thanks a lot Corrin and Chris for having raised the topic, we are all learning here and I am happy that the list is used this way.

Best,
Alex

Corrin Laposki

unread,
Apr 16, 2024, 3:19:49 PMApr 16
to iso...@googlegroups.com
Hello Alex,

Thank you for the insight and all of the information! Once I removed the raster package things worked perfectly. 

Best,
Corrin

You received this message because you are subscribed to the Google Groups "IsoriX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isorix+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isorix/bb6defce-5c15-4308-8dfb-eddff3e0e4aan%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages