argument ordered in plot_coef is not working as expected

8 views
Skip to first unread message

stefano...@gmail.com

unread,
Jul 23, 2025, 2:08:06 AMJul 23
to camtrapR
Hi Jurgen, 

sorry to bother but I just noticed that the argument ordered in the function plot_coef is not working as expected. 

I am using the latest camtrapR version available on CRAN.

My code was
myplot.area.coef <- plot_coef(object = mod.jags,
             mcmc.list = out,submodel="state",ordered=FALSE)$area
and the resulting plot Screenshot 2025-07-23 at 7.56.25 am.png

I have also tried to re-arrange the output of the function using this line of code where mylist.species.coef is a vector with the species names sort  by alphabetical order

#order the species by name
myplot.area.coef$data <- myplot.area.coef$data[match(mylist.species.coef,as.character(myplot.area.coef$data$species)),]

and although the data are now sorted alphabetically, the plot is still not right. 

Any hints on how to overcame this issue? 

Regards, 
Stef




Jürgen Niedballa

unread,
Aug 5, 2025, 1:01:41 AMAug 5
to stefano...@gmail.com, camtrapR
Hello, 
please try with the dev version from GitHub, which also has a lot of other improvements. See the Github readme for instructions.
Best regards,
Jürgen


--
You received this message because you are subscribed to the Google Groups "camtrapR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camtrapr+u...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/camtrapr/bcad2748-5e47-4eef-951e-8736dc4ffae4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages