Description Usage Arguments Value Author(s) See Also Examples
ExtractData enables the user to extract/remove a subset of data (i.e. transmitters, receivers, stations and time period) from the file. For dual sensor data, this function also allows the user to extract sensor only data (i.e. temperature or depth data) from the file.
1 2 3 |
sInputFile |
a data frame containing VTrack-transformed acoustic tracking data |
sQuerySTARTTIME |
an optional POSIXct string specifying the date/time start point from which data will be extracted from the original file. Date and time must be in the format |
sQueryENDTIME |
an optional POSIXct string specifying the date/time end point from which data will not be extracted from the original file. Date and time must be in the format |
sQueryTransmitterList |
an optional character string specifying the individual transmitters to be extracted from the original file. Default is |
sQueryReceiverList |
an optional character string specifying the receivers to be extracted from the original file. Default is |
sQueryStationList |
an optional character string specifying the stations to be extracted from the original file. Default is |
sQueryDataType |
an optional character string specifying the sensor data type (e.g. depth |
Subsets the original a data frame returning the following components:
DATETIME |
a vector of class POSIXct of the time of location fix of type |
TRANSMITTERID |
a numeric vector giving the identity of each transmitter (= |
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. |
TRANSMITTERID |
a character vector containing the identity of each transmitter (= |
RECEIVERID |
a character vector containing the factory assigned receiver serial number (= |
STATIONNAME |
a character vector containing the user defined station name (= |
Ross Dwyer, Mathew Watts, Hamish Campbell
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 | # Load the crocodile data set
data(crocs)
# Convert data into the VTrack archive format
Vcrocs <- ReadInputData(infile=crocs,
iHoursToAdd=10,
dateformat = NULL,
sVemcoFormat='1.0')
# Extract list of transmitters from test archive 1
(TransmitterList <- ExtractUniqueValues(Vcrocs,2))
# Plot the detections against time for each TRANSMITTERID
par(mfrow=c(1,1),las=1,bty="l")
plot(as.Date(Vcrocs$DATETIME), as.numeric(as.factor(as.numeric(as.character(
Vcrocs$TRANSMITTERID)))),
ylab="TRANSMITTERID",xlab="DATETIME",
yaxt="n",pch=16,cex=0.7)
axis(side=2, at=seq(1,length(TransmitterList),1),
labels = TransmitterList[order(as.numeric(
TransmitterList))])
# For TRANSMITTERID 139 plot the detections against time for each RECEIVERID
par(mfrow=c(1,1),las=1,bty="l")
T139 <- ExtractData(Vcrocs,sQueryTransmitterList = c("139"))
# Extract data from TRANSMITTERID 139 and plot raw sensor data
par(mfrow=c(1,1),las=1,bty="l")
plot(T139$SENSOR1~
T139$DATETIME,xlab="Date",
ylab="Depth (m)",main=unique(T139[,2]),
pch=16,cex=0.7)
# Extract depth only data for a certain time period.
#Vcrocs_Depth <- ExtractData(Vcrocs,
# sQueryDataType = "m",
# sQuerySTARTTIME = "2008-08-01 21:00:00",
# sQueryENDTIME = "2009-10-31 23:03:00")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.