[R] Questions for "domist... subscript out of bounds"

Sarah Goslee sarah.goslee at gmail.com
Thu Mar 24 21:11:30 CET 2011


> I want to use "domain" function to run species distribution model in R.
> I used "sp.occ.do<-domain(env.pre, pred_train, factors=c('continent')) &
> sp.occ.pre.pro<-predict(env.pre, sp.occ.do)" to predict species distribution.
> BUT, I got  "Error in domdist(object, ln[j], vals[, ln[j]]) : subscript out of
> bounds" and could not run the domain model.

> How can I solve this problem?


You could start by giving us enough information to help you.

What package did you get the domain() function from?

What do your data look like? str() and dim() are both useful
for describing data.

Can you provide a minimal workable example? dput() is one
option for providing data.

All we can tell you right now is that your data are in some
way the wrong size or shape.

Sarah

-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list