that Error: objectintercept_termsnot found (also that marks_spatial and marks_intercepts are not found). In my case, the logical if (!is.null(unlist(object[['species']][['speciesIn']]))) is FALSE, so the code doesn't correctly define intercept_terms or marks_intercepts. Similarly, the logical if (spatial) (link) is also FALSE for me, so marks_spatial was also undefined.
The issue here was due to an over-extended curly bracket and neglecting the marks_spatial object in the prediction. This has been fixed in the latest push.
See line comments:
I receive an error on line [368] (https://github.com/PhilipMostert/PointedSDMs/blob/cba293af1eca4f5b89626a7681f25f732306c70d/R/bruSDM_predict.R#L368) of predict.bruSDM
that
Error: object
intercept_termsnot found
(also thatmarks_spatial
andmarks_intercepts
are not found). In my case, the logicalif (!is.null(unlist(object[['species']][['speciesIn']])))
isFALSE
, so the code doesn't correctly defineintercept_terms
ormarks_intercepts
. Similarly, the logicalif (spatial)
(link) is alsoFALSE
for me, somarks_spatial
was also undefined.