Hi all,
i am adding my problem here as i believe it is related.... i have found namespace problems, as others have. i have solved some by specifying the namespace. i have an intermittent plotting problem that i am unable to replicate. i have plotted movement on a peninsula (spdf). And, when attempting to overlay the UD output on to the shape of the peninsula (plotted with move:: or sp::), i [sometimes/occasionally/rarely] receive the correct shape! Most often i receive one point at the centre of where the distribution should be - i receive a red circle if i plot telemetry too (as below). Recently, i realized that it was in fact my UD but it was just that it was absolutely tiny - the scaling was wrong? i have been able to solve the problem by setting 'units = FALSE' in ctmm::plot (i always always specify the namespace). i had thought that the SI unit conversion (between m and km) is not functioning correctly and so keeping everything in metres was best. this method has since fallen apart as, even including this setting, i still receive mostly a tiny version of my UD. maybe a clue is in the errors...
from this code (plotted over the shape):
ctmm::plot(current.3month_telemetry, UD = current.3month_akde, col = rainbow(length(current.3month_telemetry)), level.UD = 0.95, units = F, lwd.level = 2, add = T)
i receive warnings with my tiny UD:
In doTryCatch(return(expr), name, parentenv, handler) :
"lwd.level" is not a graphical parameter
...and...
In graphics::segments(x0 = X[j, 1], y0 = Y[j, 1], x1 = last(X[j, ... :
"lwd.level" is not a graphical parameter
i receive these warnings in two different runs of similar code. Both indicate to my (rookie) eye as though the ctmm:: function is confusing itself with another plotting function (raster or base graphics?) importantly, if i run without 'add = T', i always get the UD but i am completely unable to have both the UD and the shape.
Could it be that, even with specifying namespace, R will sometimes not recognize the plot.telemetry function? Could it be a problem further back in the analysis due to a long/lat projection?
i have completely reinstalled R, Rtools and Rstudio. and tried different combinations of attaching the packages (sp, raster , ctmm, move, any others?). i have all but given up trying to plot the UD from the AKDE object and now only use the contour lines from ctmm::SpatialPolygonsDataFrame.UD.
if anyone knows how to solve this or what i am doing wrong, i would be so grateful.
best,
Tom