Skip to content
Back to formatted view

Raw Message

Message-ID: <CAGCrCxZB9ZyeH-Ybb3BAFL12KP6qw2jKfmhpXDW79wqoFhC+TQ@mail.gmail.com>
Date: 2020-09-22T08:14:14Z
From: Torsten Hauffe
Subject: Error in Maxent (dismo package)
In-Reply-To: <CAGJ2grYCN0cPgEkkGoh-eMKJh0tKhbJd65xsERU2xZ7+wyLB+Q@mail.gmail.com>

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 at 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 at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>

	[[alternative HTML version deleted]]