Overlap function

98 views
Skip to first unread message

Sandra Cuadros

unread,
Jul 16, 2022, 1:58:26 PM7/16/22
to ctmm R user group

Hi Chris, I am having an issue when runnin overlap function.
I used the code you provide in help (see below)

library('ctmm')
data('buffalo')

# check if projections are the same
buffalo$Cilla@info$projection == buffalo$Gabs@info$projection

# fit movement models
m1 <- ctmm.select(buffalo$Cilla, ctmm.guess(buffalo$Cilla, interactive = FALSE))
m2 <- ctmm.select(buffalo$Gabs, ctmm.guess(buffalo$Gabs, interactive = FALSE))

overlap(m1, m2)


But it gives me the following error:

Error in overlap(m1, m2) :
  character object class not supported by overlap.

I have installed latest R version and updated ctmm and still don't know why this happens. Any ideas or suggestions?

Mark Bidwell

unread,
Jul 16, 2022, 3:42:29 PM7/16/22
to Sandra Cuadros, ctmm R user group
Hi Sandra — IANC (I’m not Chris) but I think the trouble might be that you’re trying to run overlap() on a movement model, not on a UD. I’m on my phone, not in front of my computer, so I can’t send you any code but check out the ?overlap help file for an example. Hope this helps, Mark

On Jul 16, 2022, at 11:58 AM, Sandra Cuadros <sandra...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "ctmm R user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ctmm-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ctmm-user/3557cb8b-56b9-4120-9e8a-6f3fe8019920n%40googlegroups.com.

Sandra Cuadros

unread,
Jul 16, 2022, 3:45:45 PM7/16/22
to Mark Bidwell, ctmm R user group
Hi Mark and Chris,

I tried with UD models too, and had no luck. FUrthermore, I am also having issues when loading dplyr in R (4.2.1). I get a message 
error: package or namespace load failed for ‘dplyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘rlang’

I have tried installing R againg, removing and installing dplyr and rland and still no luck. Any suggestions on why this might be?
--
San

Christen Fleming

unread,
Jul 16, 2022, 11:51:42 PM7/16/22
to ctmm R user group
Hi Sandra,

Overlap needs to be used on a single list, like in the example, or:

overlap(list(m1=m1,m2=m2))

I will add a more informative error to the function.

I am not familiar with the rlang error. I would check that rlang actually installed without error.

Best,
Chris
Reply all
Reply to author
Forward
Message has been deleted
0 new messages