ReadInputData: Read in a Raw VEMCO or AATAMS Data File into a VTrack Archive

Description Usage Arguments Value Author(s) Examples

Description

ReadInputData extracts single or dual sensor data from a raw VEMCO or IMOS-ATF exported file to a VTrack structured data frame.

Usage

1
2
ReadInputData(infile, iHoursToAdd=0, fIMOSATF=FALSE, fVemcoDualSensor=FALSE, 
    dateformat = NULL, sVemcoFormat='Default')

Arguments

infile

a data frame containing VEMCO/AATAMS tracking data

dateformat

an optional string containing the format of the Date.Time field

iHoursToAdd

the number of hours to add/subtract to convert the time-zone from Greenwich Mean Time (GMT)

fIMOSATF

logical. If data frame is in IMOS-ATF exported format (fIMOSATF = TRUE), fVemcoDualSensor and sVemcoFormat are ignored

fVemcoDualSensor

logical. If VEMCO file contains single sensor data (FALSE), if dual sensor data (TRUE)

sVemcoFormat

an optional string containing the format of the VEMCO file. The infile was exported from VUE in either old Version ('1.0') format, or in the new ('Default') format

Value

DATETIME

a vector of class POSIXct of the time of location fix of type

TRANSMITTERID

a numeric vector giving the identity of each transmitter (ID)

SENSOR1

a numeric vector containing the value of the environmental sensor (i.e. temperature or depth) at the time of detection

UNITS1

a character vector containing the units of each sensor value (e.g. m

TRANSMITTERID

a character vector containing the factory assigned transmitter tag id

RECEIVERID

a character vector containing the factory assigned receiver serial number (Receiver S/N)

STATIONNAME

a character vector containing the user defined station name

Author(s)

Ross Dwyer, Mathew Watts, Hamish Campbell

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Load the crocodile dataset
data(crocs)  

# Convert data into the VTrack archive format 
Vcrocs <- ReadInputData(infile=crocs,
                        iHoursToAdd=10,
                        fIMOSATF=FALSE,
                        fVemcoDualSensor=FALSE,
                        dateformat=NULL,
                        sVemcoFormat='1.0')

# Plot a frequency histogram of total detection per transmitter
NoDetect_ID <- tapply(rep(1,nrow(Vcrocs)),
                      Vcrocs$TRANSMITTERID,sum)
par(mfrow=c(1,1),las=1,bty="l")  
bp <- barplot(height=NoDetect_ID,
              ylab="Number of detections",xlab="Transmitter ID",
              axes=FALSE,axisnames=FALSE)        
labels <- names(NoDetect_ID)
text(bp, par("usr")[3],labels=labels, 
     srt=45,adj=c(1.1,1.1),xpd=TRUE,cex=0.8)
axis(2)
  
# Plot a frequency histogram of total detection per receiver
NoDetect_REC <- tapply(rep(1,nrow(Vcrocs)),Vcrocs$RECEIVERID,sum) 
bp <- barplot(height=NoDetect_REC,
              ylab="Number of detections",xlab="Receiver ID",
              axes=FALSE, axisnames=FALSE)
labels <- names(NoDetect_REC)
text(bp, par("usr")[3], labels=labels, 
     srt = 45, adj=c(1.1,1.1),xpd=TRUE,cex=0.8)
axis(2)
  
# Plot a frequency histogram of total detections over time
NoDetect_DAY <- tapply(rep(1,nrow(Vcrocs)),
                       as.Date(Vcrocs$DATETIME),sum) 
barplot(height=NoDetect_DAY,
        names.arg=names(NoDetect_DAY),
        ylab="Number of detections",
        xlab="Date")

Example output

Loading required package: foreach

VTrack documentation built on May 2, 2019, 9:16 a.m.