Hello,
I am using the cameraOperation function with a CTable argument having one row in some instances. The function works perfectly fine with 2 or more cameras, but throws an error when there is only one camera.
Error in `rownames<-`(`*tmp*`, value = "A01Cam1"):
attempt to set 'rownames' on an object with no dimensions
I believe this error appeared in the newest version of camtrapR (2.3.0) and is caused by the renaming operation rownames(camop_binary) <- rownames(camOp_empty) (in the function code), which is intended to be performed on rows of a matrix but happens on a vector when there is only one camera. I guess it should be easily fixable by setting a special case when there is only one camera!
Hello, I am using the
cameraOperation
function with aCTable
argument having one row in some instances. The function works perfectly fine with 2 or more cameras, but throws an error when there is only one camera.The error I get is the following:
I believe this error appeared in the newest version of camtrapR (2.3.0) and is caused by the renaming operation
rownames(camop_binary) <- rownames(camOp_empty)
(in the function code), which is intended to be performed on rows of a matrix but happens on a vector when there is only one camera. I guess it should be easily fixable by setting a special case when there is only one camera!Thank you for your time!