I have a series of lat/long coordinates for capture sites and roost trees of bats. I'd like to connect the dots between the captures and roosts in order of date, and individual (each bat has a unique ID). I've found numerous ways of plot the tracks via either the "move" or "moveHMM" packages. But I haven't found a way to export the tracks as a shapefile. Here's an example of what I'd like to do using data and code from the "moveHMM" package:
install.packages("moveHMM")
install.packages("rgdal")
library(moveHMM)
library(rgdal)
elk_data$Easting <- elk_data$Easting/1000
elk_data$Northing <- elk_data$Northing/1000
data <- prepData(elk_data,type = "UTM",coordNames = c("Easting","Northing"))
utmcoord <- SpatialPoints(cbind(data$x*1000,data$y*1000),proj4string=CRS("+proj=utm +zone=17"))
llcoord <- spTransform(utmcoord,CRS("+proj=longlat"))
lldata <- data.frame(ID=data$ID,x=attr(llcoord,"coords")
[,1],y=attr(llcoord,"coords")[,2])
plotSat(lldata,zoom=8)
I'd like to have the tracks for the 4 elk displayed in this plot to all be within one shapefile. Thanks for any help you can provide.
Keith