# NOT RUN {
data(lynxjura)
map <- lynxjura$map
## We keep only "wild" indices.
tmp <- lynxjura$loc[,4] != "D"
locs <- lynxjura$locs[tmp, c("X","Y")]
dataenfa1 <- data2enfa(map, locs)
(enfa1 <- enfa(dudi.pca(dataenfa1$tab, scannf=FALSE),
dataenfa1$pr, scannf = FALSE))
## Compute the prediction
pred <- predict(enfa1, dataenfa1$index, dataenfa1$attr)
image(pred)
contour(pred, col="green", add=T)
points(locs, col = "red", pch = 16)
## Lighter areas are the most preferred areas
# }
Run the code above in your browser using DataLab