# NOT RUN {
data(calves)
calves.dateTime<-datetime.append(calves, date = calves$date, time =
calves$time) #create a dataframe with dateTime identifiers for location foxes
calves.agg<-tempAggregate(calves.dateTime, id = calves.dateTime$calftag,
dateTime = calves.dateTime$dateTime, point.x = calves.dateTime$x,
point.y = calves.dateTime$y, secondAgg = 300, extrapolate.left = FALSE,
extrapolate.right = FALSE, resolutionLevel = "reduced", parallel = FALSE,
na.rm = TRUE, smooth.type = 1) #smooth locations to 5-min fix intervals.
calves.dist<-dist2All_df(x = calves.agg, parallel = FALSE, dataType = "Point",
lonlat = FALSE) #calculate distance between all individuals at each timepoint
calves.contact.block<-contactDur.all(x = calves.dist, dist.threshold=1,
sec.threshold=10, blocking = TRUE, blockUnit = "hours", blockLength = 1,
equidistant.time = FALSE, parallel = FALSE, reportParameters = TRUE)
calves.contact.NOblock<-contactDur.all(x = calves.dist, dist.threshold=1,
sec.threshold=10, blocking = FALSE, blockUnit = "hours", blockLength = 1,
equidistant.time = FALSE, parallel = FALSE, reportParameters = TRUE)
# }
Run the code above in your browser using DataLab