Jump to content


Photo

FlightR Troubleshooting

FlightR

  • Please log in to reply
3 replies to this topic

#1 andyjboyce

andyjboyce
  • Society Members
  • 2 posts
  • University of Montana, Missoula, MT, USA,
  • United States

Posted 23 June 2017 - 04:56 PM

Hello all,

 

I am having an issue generating the prerun object for FlightR analyses.

 

The first signs of trouble occur when running "make.calibration", I get the following warnings:

 
[68] WARNING: Warning in log(cur.slope$slope) : NaNs produced
Warning in log(All.slopes$Slopes$Slope) : NaNs produced
 
Then, when attempting to generate the prerun object, I get: 
[69] ERROR: invalid subscript type 'list'
 
Given the error, I assume this is something silly, but I would greatly appreciate any help that anyone could provide. 
 
Here is the last line of code:
 
all.in<-make.prerun.object(Proc.data, Grid, start=c(-108.23, 37.58), end = NA, Calibration=Calibration)
 
Thank you!
Andy Boyce
 
 
 


#2 andyjboyce

andyjboyce
  • Society Members
  • 2 posts
  • University of Montana, Missoula, MT, USA,
  • United States

Posted 23 June 2017 - 06:13 PM

Here is the code leading up to the error(s):

 

fr<-GeoLight2TAGS(d.lig,twl,threshold=2.5)
write.csv(fr, file = "tags_data.csv")
 
Proc.data<-get.tags.data("tags_data.csv")
 
Calibration.periods<-data.frame(
        calibration.start=as.POSIXct("2015-07-05"),
        calibration.stop=as.POSIXct("2015-07-25"),
        lon=-108.23, lat=37.58) 
#use c() also for the geographic coordinates, -108.23, 37.58 
#if you have more than one calibration location
# (e. g.,  lon=c(5.43, 6.00), lat=c(52.93,52.94))
print(Calibration.periods)
 
Calibration<-make.calibration(Proc.data, Calibration.periods)
plot_slopes_by_location(Proc.data=Proc.data, location=c(-108.23, 37.58))
 
Grid<-make.grid(left=-140, bottom=10, right=-50, top=42,
   distance.from.land.allowed.to.use=c(-Inf, Inf),
   distance.from.land.allowed.to.stay=c(-Inf, Inf))


#3 Eldar

Eldar
  • General Members
  • 47 posts
  • Netherlands,
  • Netherlands

Posted 26 June 2017 - 04:56 AM

 Hi Andy,

 Could you please save image and send it to me? I will have a look then, Should be something simple, but I do not see it from the code.

save.image('tmp.RData') 

   Eldar



#4 Eldar

Eldar
  • General Members
  • 47 posts
  • Netherlands,
  • Netherlands

Posted 29 June 2017 - 01:29 PM

  That was not an easy one. You had NAs in gl_twl, so somehow you created them there...

 I have updated FLightR, so now it will recognise the issue and will warn you at the import functions. The latest version is on GitHub.

  Hope it helps







Also tagged with one or more of these keywords: FlightR

0 user(s) are reading this topic

0 members(s), 0 guests(s) and 0 anonymous member(s)