by cowzrgr8 » Tue Apr 03, 2018 1:31 pm
I want to see what extrinsic factors (such as wetland depth, elevation, distance to roads, etc.) are affecting trap success using the probability density. It sounds like I just want to use the covariate "D.fx" to just show turtles that were actually caught.
I tried using the script you suggested but had the same problem where the rasterized version of the plot looked nothing like the density:
fxsurface <- fx.total(pawtuckaway_secrPoly100)
plot(fxsurface, "D.fx")
print(fxsurface)
r <- raster(fxsurface, 'D.fx')
plot(r)
# or, if that doesn't work
plot(r, useRaster = FALSE)
writeRaster(r, "r.raster", overwrite = TRUE)
I think it may have something to do with the warning I get immediately after "r <-raster(fxsurface, 'D.fx'): Warning message:
In matrix(tmp, nrow = ny, ncol = nx, byrow = TRUE) :
data length [6237] is not a sub-multiple or multiple of the number of rows [82]
I'm assuming this means something is wrong with the format of my data, but I'm not sure what.
Thank you for the quick response
Becca