ActivityOverlap with more than 2 species

14 views
Skip to first unread message

Raphaelle Abn

unread,
Apr 29, 2024, 5:56:59 AMApr 29
to camtrapR
Hi, 
I would like to plot the diel activity of 5 species on the same graph to see the differences. I noticed that the function ActivityOverlap only allows the overlap of 2 speices curves. Does anyone has an idea of another method to make a multi-species activity plot ? Thanks !

Raphaëlle

Jarrad Barnes

unread,
Apr 29, 2024, 6:10:59 AMApr 29
to camtrapR
As far as I know it's not possible with overlap() as yet. However, follow this tutorial, it should do what you want using ggplot2:

Jürgen Niedballa

unread,
May 14, 2024, 8:00:38 PMMay 14
to Jarrad Barnes, camtrapR
Just an ugly workaround, but you could use the output of activityOverlap(), which is a data frame with 3 columns (time, density species A, density species B).
Do that for all relevant species, name the columns, then combine the data frames via cbind, melt (to convert from wide to long format), then plot with ggplot2.

Alternatively, you could use the densityPlot function from overlap, which also returns a data frame of time and density for further plotting.
Best,
J

--
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 on the web, visit https://groups.google.com/d/msgid/camtrapr/349dccbb-4251-4e12-8aa3-a8e0f939da3bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages