camopPlot - must have more than one station?

14 views
Skip to first unread message

davidgeorg...@gmail.com

unread,
Sep 6, 2020, 7:32:56 PM9/6/20
to camtrapR
Juergen

Am I right in understanding camopPlot must have more than one station (or session, presumably)?

When I was trying to understand, I simplified my dataset to just one station and then comopPlot processed it needed a matrix.

David

Juergen Niedballa

unread,
Sep 7, 2020, 7:08:37 AM9/7/20
to camtrapR
Hi David,
as long as it is a matrix with dates as column names, it should work. When indexing with [] I just found R doesn't return a matrix (instead, numeric), which makes camopPlot fail. Using subset on the camera operation matrix works though.

example("cameraOperation")
# this works
camopPlot(subset(camop_problem, subset = rownames(camop_problem) == "StationA"))

# this doesn't
camopPlot(camop_problem[1,])
 Error in seq.default(from = 0, to = 1, length.out = nrow(camOp)) : 
  argument 'length.out' must be of length 1

I hope this helps. Never considered the case of plotting it for one station only. Please let me know if you need more assistance or if this is not what you had in mind. 
Best regards,
Jürgen
Reply all
Reply to author
Forward
0 new messages