by Luciano » Sun Jun 09, 2019 9:59 pm
I have similar formatting issues using transect detectors. I have looked for the errors in other threads, and tried to apply the suggested solutions, unfortunately with no results.
My transects consist of three vertices each (start, middle, end points), and the animals' captures have been added as extra vertices along the corresponding transect.
I assume that there is some bug with the format of my files, even though they appear in the correct form.
When I use the function read.capthist, R studio gives me this message
> all.data <- read.capthist(captfile= "capfile190606.txt",
+ trapfile="trapfile190607.txt",
+ detector="transect", fmt="XY", trapcovnames=
+ c("rugg_100","rugg_500","rugg_1000",
+ "m_sl100","m_sl500",
+ "m_sl1000"))
Error in rep(NA, nfield - nvar) : invalid 'times' argument
I tried to create a trap object, but again get this error:
Error in read.traps(file = "trapfile190607.txt", detector = "transect", :
requires 3 fields (detectorID, x, y)
Or using make.capthist
Error in captures[, 1] : incorrect number of dimensions
Using a *.csv file as input, or creating a dataframe from either a *.txt or *.csv does not solve the problem.
I thought that I might have forgotten to add some animals as vertex in the trap file, but I checked several times and they have been all included.
I can send the files for a quick check if someone has time to have a look.
Thanks for any help
Luciano