James-Thorson / spatial_DFA

Spatial dynamic factor analysis, for estimating spatiotemporal density dependence in community dynamics
7 stars 4 forks source link

Example crashing during MakeInput_Fn #2

Closed hoyles closed 7 years ago

hoyles commented 7 years ago

MakeInput_Fn crashed for me with a Spatial_DFA analysis I was trying to run, so I retried it with the example in the package and got the same problem. The spatial_DFA script 'simulation_example.R' is crashing during 'MakeInput_Fn' at line 44, indicating an unused argument. On debugging, the error seems to be coming from SpatialDeltaGLMM::Calc_Anisotropic_Mesh. I'm not sure if this is a problem with my setup or with the package, but I've tried reinstalling everything (R & MRO, Rtools, TMB, INLA, Spatial_DFA) and running it on several machines, and always get the same problem.

Thanks, Simon

This is the error message: Error in INLA::inla.mesh.create(loc_x, plot.delay = NULL, refine = refine, : unused argument (mesh = list(meta = list(call = inla.mesh.create(loc = loc_xy), fmesher.args = "--input=input.s --cet=16,-0.1 ", time = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), prefix = "C:/Users/Simon/AppData/Local/Temp/RtmpwDPMJs/fmesher1180627e91b.", is.refined = FALSE), manifold = "R2", n = 65, loc = c(1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 0.831217259396769, 7.16878274060323, 7.4806525795722, 7.7193474204278, 7.84852813742386, 7.84852813742385, 7.71934742042779, 7.4806525795722, 7.16878274060323, 0.831217259396773, 0.519347420427806, 0.280652579572209, 0.151471862576141, 0.151471862576142, 0.280652579572205, 0.519347420427794, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 0.151471862576143, 0.151471862576141, 0.2806525795722, 0.

James-Thorson commented 7 years ago

OK, I think that my most recent version should fix that problem (the example now runs).

I broke backwards dependence in a change to SpatialDeltaGLMM to allow using a isotropic spherical projection for packages at www.FishStats.org. I only actively maintain SpatialDeltaGLMM and VAST, so I didn't think to make the necessary small change to SpatialDFA

Please note that I recommend using package VAST instead of SpatialDFA, and please tell me if you'd like help switching over (the tutorial, version-control, and maintenance will all be higher quality for VAST, and it can do almost everything that SpatialDFA does)

hoyles commented 7 years ago

Great, works for me now too. My few runs should work with spatial_DFA for now, but I'll switch to VAST in future. Thanks again.