if (FALSE) {
data(lynxjura)
map <- lynxjura$map
## We keep only "wild" indices.
locs <- lynxjura$locs
locs <- locs[slot(locs, "data")[,2]!="D",]
pr <- slot(count.points(locs, map), "data")[,1]
(enfa1 <- enfa(dudi.pca(slot(map, "data"), scannf=FALSE),
pr, scannf = FALSE))
## Compute the prediction
pred <- predict(enfa1, map)
image(pred)
contour(pred, col="green", add=TRUE)
points(locs, pch = 3)
}
Run the code above in your browser using DataLab