Jump to content
Ornithology Exchange

BAStag: Import ".deg" immersion files from Migrate Tech Intigeo tags


Hendrik

Recommended Posts

Hi there and a belated merry Christmas,

 

I was just looking into importing ".deg" files (immersion count data as provided by Intigeo loggers) into BAStag and was delighted to see that a function ("readMTdeg") has recently been added. However, something seems to be off, the description of the function states "Read Temperature data from a Migrate Technologies tag", which basically resembles the description of "readMTsst" which serves to importing ".SST" files (which contain temperature  and conductivity data). Importantly, ".deg" files contain immersion count data only. When executing "readMTdeg" I get:

 

Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  line 1 did not have 6 elements

 

These six elements are almost certainly referring to the six elements found in the readMTsst function. I am therefore wondering whether the wrong code may have accidentally slipped into the new "readMTdeg" function. A function to import .deg files (immersion count data) into Bastag would be extremely helpful. My (tedious) workaround at the moment is to manually convert them into the more common ".act" format as provided by Bastag loggers.

 

I will post this issue on the appropriate Github page as well:

 

https://github.com/SWotherspoon/BAStag/issues/7

 

Any comments or help would be very much appreciated! thank you very much and have a good start into the new year!

 

Hendrik

Link to comment
Share on other sites

I think I solved the problem already. I managed to edit the existing function "readMTdeg" the following way:

 

readMTdeg2 <- function(file,skip=20) {
  ## Read csv file and add column names
  d <- read.table(file,header=FALSE,skip=skip,  sep="\t",col.names=c("Date","Activity"), colClasses=c("character","numeric"))
  #Parse date
  # Use %I, since the Intigeo time data are provided as decimal hours (12 hour)
  d$Date <- as.POSIXct(strptime(d$Date,"%d/%m/%Y %I:%M:%S %p",tz="GMT"))
  #Return data frame.
  d
}
 

That seems to work well in case someone else comes across this issue.

 

Hendrik

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...