Not sure where your problem is. If you have the SpatialPixelsDataFrame and
the SpatialPoints, did you try to go on like in the example?
tab <- slot(map, "data")
pr <- slot(count.points(locs, map), "data")[,1]
pc <- dudi.pca(tab, scannf = FALSE)
(enfa1 <- enfa(pc, pr, scannf = FALSE, nf = 3))
et
Dear Mathieu,
The join/cbind/@data is wonderful!
However, if I try to join the location data as a data.frame or sp class it
does not work.
What would be the solution to this portion of the equation?
In other words, how to I add locations to the formula?
Thank you a million * ∞ !
Alannie
Sorry I didn't spot that one before... Please try:
join<- cbind(bio1, bio2, bio3, bio4, bio5, bio6, bio7)
and check the class and data:
summary(join)
You want this to be of class SpatialGridDataFrame (or
SpatialPixelsDataFrame), so you want to keep the spatial attributes
together with the da
Dear Mathieu,
Thank you for the assistance.
Upon executing the situation where I take the material of 'join' to
replace 'map' I receive an error:
> join<- cbind(bio1@data, bio2@data, bio3@data, bio4@data, bio5@data,
bio6@data, bio7@data)
> tab <- slot(join, "data")
Error in slot(join, "data") :
Dear Alannie,
Obviously all these "data"s are confusing :)
The 'enfa' example uses a dataset call 'lynxjura' (not 'data'), which is a
list with several elements. One of these elements is the maps, with the
name 'map' (singular!). This is what you want to achieve. This is simply a
SpatialPixels
Hi folks!
I have been having significant difficulty using the sp classes to perform
the ENFA in R.
The objective of this posting is to inquire about how to "prepare data for
the ENFA," which in previous versions of the software package adehabitat was
carried out via 'data2enfa' and the 'dudi.pca'