[R-sig-Geo] Help with ENFA in R
Mathieu Basille
basille at ase-research.org
Fri Apr 19 04:37:39 CEST 2013
Jonathan,
I think you are confusing many aspects here...
The ENFA works on two objects:
* a PCA, which provides the environmental data;
* a vector, which provides the utilization distribution.
1) The PCA is build on the "data" slot of a SpatialPixelsDataFrame, which
stores all environmental rasters. The "data" slot that we use is itself of
class 'data.frame'.
2) The utilization distribution is based on the presence points and is also
stored in a SpatialPixelsDataFrame, which gives the number of points per
pixel. Again, the ENFA only uses the "data" slot of this
SpatialPixelsDataFrame. Such map can be created with 'count.points' on a
object of class SpatialPoints or SpatialPointsDataFrame, and also requires
the former SpatialPixelsDataFrame which stores the environmental attributes
(this is just to provide a grid for the 'count.points' function).
Please check every object at each step, and provide reproducible examples
in case you don't manage to get it work. The examples + vignettes of both
adehabitatHS and sp are in principle sufficient to run an ENFA without any
problem.
Best of luck,
Mathieu Basille.
Le 04/16/2013 09:59 AM, JonathanAronson a écrit :
> Hi there
> I have managed to preapre my data finally to do the enfa. However, when I
> run the test I get an error and warning message shown below:
>
> ENFA <- enfa(pc, pr, scannf = FALSE)
> Error in crossprod(Ze, DpZ) : non-conformable arguments
> In addition: Warning messages:
> 1: In x * pr :
> longer object length is not a multiple of shorter object length
> 2: In x * pr :
> longer object length is not a multiple of shorter object length
> 3: In x * pr :
> longer object length is not a multiple of shorter object length
> 4: In x * pr :
> longer object length is not a multiple of shorter object length
>
> Im not sure what this means. I thought there could be a mismatch between my
> locality points and the environmental maps but Ive plotted the points and
> they are in the correct locations. Has anyone encountered this before and
> can you please provide some advice about how to deal with it.
>
> Thank you Clement, Mathieu and Alex for your help thus far!!
>
> Jon
>
>
>
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Help-with-ENFA-in-R-tp7583243p7583325.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
~$ whoami
Mathieu Basille, PhD
~$ locate --details
University of Florida \\
Fort Lauderdale Research and Education Center
(+1) 954-577-6314
http://ase-research.org/basille
~$ fortune
« Le tout est de tout dire, et je manque de mots
Et je manque de temps, et je manque d'audace. »
-- Paul Éluard
More information about the R-sig-Geo
mailing list