spOccupancy_Error

26 views
Skip to first unread message

Rodney Naleba

unread,
Aug 4, 2024, 8:00:12 AMAug 4
to spocc-spa...@googlegroups.com, Doser, Jeffrey
Hi Jeff and everyone here,
Error in as.vector(x, mode) : 
  cannot coerce type 'closure' to vector of type 'any'
I happen to be getting this error whenever I try to run my spOccupancy model.
It is a new error that I was previously not getting & this feels strange.
How can I fix this?

Thanks and regards,
Rodney


Jeffrey Doser

unread,
Aug 6, 2024, 5:26:39 AMAug 6
to Rodney Naleba, spocc-spa...@googlegroups.com
Hi Rodney,

This error could arise for a variety of reasons, so it's a bit hard to say without seeing the code that led you to the error. It likely is a result of there not being an object that spOccupancy expects to be of one form, and it is instead in some other form. Check to make sure all the components of the "data" list are properly formatted. This could also happen if you mis-specify the "occ.formula" or "det.formula" (e.g., by not putting a ~ at the front of the formula). If that doesn't help, feel free to send me your code/data to reproduce the error then I can take a look.

Thanks,

Jeff

--
You received this message because you are subscribed to the Google Groups "spOccupancy and spAbundance users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spocc-spabund-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spocc-spabund-users/CAPwf97urMTj7Q-CijmvEo4OAoD5AvLjVGyrOiv8o_dq-h3hogA%40mail.gmail.com.


--
Jeffrey W. Doser, Ph.D.
Assistant Professor
Department of Forestry and Environmental Resources
North Carolina State University
Pronouns: he/him/his
Reply all
Reply to author
Forward
0 new messages