error with run.simulation from the dsims package

16 views
Skip to first unread message

Janet Mossman

unread,
Jun 6, 2023, 8:18:41 PM6/6/23
to distance-sampling
Hi all
Has anyone encountered the following error with run.simulation with the dsims package? 
Have been running the same code for months now with no issues but in the last week I have started getting the following error. I can get the sims to run for about 500ish iterations but then it breaks down. 
Error in .local(obj, ...) : NA values in coordinates

I have checked the coordinates in my make.region shapefile and there are no Na values in the geometry fields. 
Thanks!
Janet

Eric Rexstad

unread,
Jun 7, 2023, 3:32:32 AM6/7/23
to Janet Mossman, distance-sampling
Janet

That sounds like a tricky problem if you've had previous success with your code and you get deep into your simulation before the error arises.  It is not an error that I've previously encountered.

We might have to ask you to send your code and shape file along to us off-list for further investigation. It might take some time to get to the bottom of it.  Any other debugging info you can send along would be helpful.

From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Janet Mossman <pacif...@gmail.com>
Sent: 07 June 2023 01:18
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] error with run.simulation from the dsims package
 
--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/da54864e-10d5-4dc0-aca7-0fac7ea78923n%40googlegroups.com.

Janet Mossman

unread,
Jun 7, 2023, 11:44:55 AM6/7/23
to distance-sampling
Could it be related to the depreciation of the rgeos package at all? I'm not sure if dsims uses this package in the background? I will try to send the code to you later today. It ran successfully overnight...not sure where the error is coming from.

Laura Marshall

unread,
Jun 7, 2023, 12:32:01 PM6/7/23
to Janet Mossman, distance-sampling
Dear Janet,

It sounds like there is a rare error occurring occasionally likley when the transects are generated.
This will be hard to diagnose but if you send me the code and shapefiles off-list I can take a look.

Best wishes,
Laura

Dr. L Marshall

Centre for Research into Ecological & Environmental Modelling

University of St. Andrews

Tel: +44 (0)1334 461808


While I may send emails outside of my normal office hours, I have no expectation of a response outside of yours.

Please note that my core working hours are now concentrated between 9am Monday and 2pm Thursday. There may be a delay in my response to emails outwith these times.





Sent: 07 June 2023 16:44
To: distance-sampling <distance...@googlegroups.com>
Subject: Re: [distance-sampling] error with run.simulation from the dsims package
 
Reply all
Reply to author
Forward
0 new messages