Zuzana Zajkova Posted July 12, 2021 Share Posted July 12, 2021 Hi, I am analysing GLS data and got errors using lightImage() and preprocessLight() functions. The error I get is following (actually the same for both cases): TwGeos::lightImage(raw, offset = offset, zlim = c(0, 64), main = gls_sel) Error in if (as.numeric(tmin) > as.numeric(date[1])) tmin <- tmin - 24 * : argument is of length zero twl <- preprocessLight(raw, threshold = threshold, offset = offset, lmax = 64, # max. light value gr.Device = "x11") Error in if (as.numeric(tmin) > as.numeric(date[1])) tmin <- tmin - 24 * : argument is of length zero In addition: Warning messages: 1: In min(tagdata$Date) : no non-missing arguments to min; returning Inf 2: In max(tagdata$Date) : no non-missing arguments to max; returning -Inf I was able to get the lightImage at the beginning, but later for some reason I only got the error message. Interestingly, I can plot the light image using the tsimage() function with the same data: tsimage(date = raw$dtime, y = raw$lig, offset = offset, ylab = "Hour local [GMT + 10h]", main = gls_sel) I tried it on three versions of R (3.6.3, 4.0.2, 4.1.0) on different computers all running on Mac, also on data from different tracks, getting the same error message. Would be very thankful if you could help me to find out what may cause the errors. Zuzana Link to comment Share on other sites More sharing options...
konstantinos Posted October 3, 2021 Share Posted October 3, 2021 Hi Zuzana, A very late response... In few cases the error is generated on how you read your file. Try to read it with readLig() All the best! Link to comment Share on other sites More sharing options...
Recommended Posts