## Not run:
# ###GenerateAnimationKMLFile example
#
# # Note, users must download Google Earth in order to visualise the kml.
# # Extract residence and nonresidence events from the archived crocodile data
#
# # Load crocodile datset into VTrack archive
# data(crocs)
# Vcrocs <- ReadInputData(infile=crocs,
# iHoursToAdd=10,
# fAATAMS=FALSE,
# fVemcoDualSensor=FALSE,
# dateformat = NULL,
# sVemcoFormat='1.0')
#
# # Load Wenlock points file and generate circuitous distance matrix
# data(PointsCircuitous_crocs)
# CircuitousDM <- GenerateCircuitousDistance(PointsCircuitous_crocs)
#
# # Extract transmitter #139 data from crocs dataset
# T139 <- ExtractData(Vcrocs,sQueryTransmitterList = c("139"))
#
# # Extract residence and nonresidence events from the archived crocodile data
# # Events occur when >1 detections occurs at a receiver and
# # detections are less than 43200 seconds (12hrs) apart
# # The circuitous distance matrix is used for distance calculations
# T139Res<- RunResidenceExtraction(T139,
# "RECEIVERID",
# 2,
# 43200,
# sDistanceMatrix=CircuitousDM)
#
# # The residences event file
# T139resid <- T139Res$residences
# # The nonresidences event file
# T139nonresid <- T139Res$nonresidences
#
# # Set working directory (in this case a temporary directory)
# setwd(tempdir())
#
# # Write the files to the temporary directory
# write.csv(T139resid,"T139_resid.csv",row.names=FALSE)
# write.csv(T139nonresid,"T139_nonresid.csv",row.names=FALSE)
# write.csv(PointsCircuitous_crocs,"PointsCircuitous_crocs.csv",row.names=FALSE)
#
# # Now generate the .kml animation and save to the temporary directory
# GenerateAnimationKMLFile("T139_resid.csv","T139_nonresid.csv","PointsCircuitous_crocs.csv",
# "T139.KML","ff0000ff")
#
# # This file can be found within the tempdir() directory on your computer.
# # Double-click on the .kml file to open in Google Earth
# ## End(Not run)
Run the code above in your browser using DataLab