[R-sig-eco] Error in Maxent (dismo package)

Irene Rojo |re@rojo @end|ng |rom gm@||@com
Tue Sep 22 10:28:50 CEST 2020


Dear Torsten,

It works now, you were right. Thanks a lot!!

Irene


El mar., 22 sept. 2020 a las 10:14, Torsten Hauffe (<
torsten.hauffe using gmail.com>) escribió:

> Hi,
>
> I can't try it but maybe you need a vector with all factorial predictors.
> Hence, put them all in c().
>
> me <- maxent(predictors, occtrain, factors=c("bion","morfo", "sed"))
>
> On Tue, Sep 22, 2020 at 10:08 AM Irene Rojo <ire.rojo using gmail.com> wrote:
>
>> Dear all,
>>
>> I am fitting maxent models within the dismo package but I have some doubts
>> regarding the number of categorical variables (factors) that I can include
>> in the model. All my variables are raster (.asc).
>>
>> When I perform the model with just one factor (me <- maxent(predictors,
>> occtrain, factors="bion")) it runs and everything works fine, but when I
>> try to add more factors (me <- maxent(predictors, occtrain,
>> factors="bion",
>> "morfo", "sed")) I get the following error:
>>
>> Error in .getMatrix(a) :
>>   data should be  a matrix, data.frame, or SpatialPoints* object
>>
>> When I just include one factor (whatever the variable is) it works, so I
>> don't know if it is a syntax problem and I am not including the rest of
>> the
>> factors in a proper way (separated by commas), or if it is not possible to
>> add more than one factor.
>>
>> Any advice will be much appreciated!
>>
>> Thanks in advance,
>>
>> Irene
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-ecology mailing list
>> R-sig-ecology using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>>
>

	[[alternative HTML version deleted]]



More information about the R-sig-ecology mailing list