Jump to content
Ornithology Exchange (brought to you by the Ornithological Council)

Error message with lightImage and preprocessLight


egow

Recommended Posts

I'm trying to calibrate from a light image from a Bas tag. I get an error when I call: lightImage(d.lux, offset = offset) and twlpreprocessLight(d.lux, threshold, offset, lmax = 64, map=TRUE)

 

This is the error I get: 

 

Error in if (as.numeric(tmin) > as.numeric(date[1])) tmin

  missing value where TRUE/FALSE needed
 
I'm not sure why I'm getting this error. I have about 23 .lig files that give me this error. The others seem to work. When I look at the .lig files I don't see any differences between the ones that are working and the ones that are not. 
 
Anyway to fix this? I'm not able to process the geol data without this working. 
 
Thanks in advance. 
Link to comment
Share on other sites

  • 2 weeks later...

Hi Egow,

 

I believe I received the same error whenever I was trying to process my .lig files. I think the error occurs because the preprocesslight function is looking for tagdata that only has a column for Date and Light, but the .lig files give you four columns. I was able to remedy the situation by using:

Lig<-readLig("file.lig")
Bird<-Lig[,c(-1,-3)]

This way the .lig file that you are using for the preprocess light function only has the Date and Light column that is required. 

 

I'm not sure if you are having the same problem that i was having but this worked for me.

 

Hope this helps,

Devin

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

It could indeed be that there are too many columns but most likely the columns have the same name. They need to be "Date" and "Light" (with capital 1st letter).

 

Another issue could be, that the time format is not right. Best to see check str(Lig) and head(Lig) to see whether it all makes sense.

 

ALSO, there is a package that is based on BAStag but has some further developments and bug fixes (e.g. TwGeos - github.com/slisovski/TwGeos).

 

Cheers,

Simeon

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...