Hello,
I am still new to ctmm and tackle the following problem(s):
I have 199 tracks (cat tracks) downloaded as csv file (see below) from Movebank.
Running my script (see below), I get the sKDE polygons I want, but using writeShapefile I am loosing all attributes (e.g. individual-local-identifier, individual-taxon-canonical-name).
Is there any way to include such attribute from the original Movebank csv file in the output shapefile?
Hope anyone can help
Cheers
stefan
My_ctmm_cat_tracks_script.R :
install.packages("proj4")
install.packages('bit64')
tracks <- as.telemetry('PetcatsSA199.csv',timeformat="",timezone="UTC",projection=NULL,timeout=Inf,na.rm="row",drop=TRUE)
trackIDs <- names(tracks)
no_tracks <- length(trackIDs)
folder <- paste(getwd(),"/shp-output2", sep="")
GUESS <- ctmm.guess(track_h,interactive=FALSE)
FIT <- ctmm.fit(track_h,GUESS)
assign(paste("UD", i, sep = ""), UD)
writeShapefile(UD,folder,file=NULL,level.UD=0.95,level=0.95)
PetcatsSA199.csv (extraction):
event-id |
visible |
timestamp |
location-long |
location-lat |
sensor-type |
individual-taxon-canonical-name |
tag-local-identifier |
individual-local-identifier |
study-name |
5555318653 |
TRUE |
8/28/2015 11:18 |
138.6275 |
-35.0034 |
gps |
Felis catus |
117 |
117 |
PetcatsSA199 |
5555318654 |
TRUE |
8/28/2015 11:21 |
138.6275 |
-35.0034 |
gps |
Felis catus |
117 |
117 |
PetcatsSA199 |
5555318656 |
TRUE |
8/28/2015 11:27 |
138.6274 |
-35.0036 |
gps |
Felis catus |
117 |
117 |
PetcatsSA199 |
5555318669 ... |
TRUE ... |
8/28/2015 12:08 ... |
138.6273 ... |
-35.0033 ... |
gps ... |
Felis catus ... |
117 ... |
117 ... |
PetcatsSA199 ... |