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

LightImage function error


Recommended Posts

I have run the LightImage function as part of the FLightR script many times without any issues, but recently it "stopped working". I have updated various packages, R studio and R versions, but I don't see why I'm now getting the error I do.

 

> d.lux$Light<- log(d.lux$Light)
> head(d.lux)
Date Light
1 2013-04-20 15:14:01 6.302619
2 2013-04-20 15:19:01 5.159055
3 2013-04-20 15:24:01 5.257495
4 2013-04-20 15:29:01 5.594711
5 2013-04-20 15:34:01 5.181784
6 2013-04-20 15:39:01 4.663439

> lightImage(tagdata = d.lux,
+ offset = offset,
+ zlim = c(0, 12), # y axis
+ dt = 300) # recording interval in seconds (300 if every 5min)
Error in if (as.numeric(tmax) < as.numeric(date[length(date)])) tmax <- tmax + :
missing value where TRUE/FALSE needed

 

> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base

other attached packages:
[1] maptools_0.9-2 sp_1.2-5 MASS_7.3-47 SGAT_0.1.3
[5] TwGeos_0.0-1 GeoLight_2.0.0 maps_3.2.0 FLightR_0.4.6
[9] BAStag_0.1.3

loaded via a namespace (and not attached):
[1] Rcpp_0.12.13 lattice_0.20-35 changepoint_2.2.2 zoo_1.8-0
[5] spam_2.1-1 coda_0.19-1 raster_2.5-8 tools_3.4.2
[9] foreign_0.8-69 fields_9.0 compiler_3.4.2 dotCall64_0.9-04  
>

 

Any thought? Many thanks, Louise

Link to comment
Share on other sites

  Hi Louise,

 Check the last value in your file:

tail(d.lux)

it is likelyt that there is NA value somehow.

 If not send me and Simeon your file and the code you have before the error.

   Eldar

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...