Error writeShapefile.ctmm not found

44 views
Skip to first unread message

adrian...@gmail.com

unread,
Apr 7, 2023, 1:31:09 PM4/7/23
to ctmm R user group

Hi Chris,
I am trying to create shapefiles from a list with akde UD. I am getting the error pasted below. My list has 151 akde UD and this error pops up in individual 55. 

for(i in 1:length(tv.nonbreeding)){
writeShapefile(V.AKDE.nonbreeding[[i]],folder=getwd(),file=paste(names(tv.nonbreeding)[i]),level.UD=0.95)
}

Error in utils::getS3method("writeShapefile", CLASS) :
  S3 method 'writeShapefile.ctmm' not found
In addition: There were 20 warnings (use warnings() to see them)



I am sending a subset of the data where the error is occurring. Any guess what could be happening here? Thanks for the help. All the best,
Adrian



export error.RData

Christen Fleming

unread,
Apr 9, 2023, 1:45:53 AM4/9/23
to ctmm R user group
Hi Adrian,

The second element is not a UD object:

> sapply(V.AKDE.nonbreeding,class)
[1] "UD"   "list" "UD"   "UD"   "UD"   "UD"   "UD" 


It appears to be a list with one ctmm object of zero variance. The list aside, if you put a "bad" model like this into akde() then it will just spit the model back out, as that can still be used equivalently for some functions like summary(). I have not written a writeShapefile method for ctmm objects, but in this case there's no valid shapefile that could be calculated.

Best,
Chris
Reply all
Reply to author
Forward
0 new messages