Hello,
I would like to make an ENFA with R using 4 variables: DTM exposure (=MNT Exposition), DTM slope (=MNT pente), distance to pond (=Dist_mares) and land use (OSC Theia).
Before processing my data with R, I formatted the 4 variable layers in GIS so that they have the same coverage and resolution.
Then I converted these layers into ASCII files (*.asc) to be able to enter them in R.
In R, I imported the 4 layers with the import.asc function of the adehabitat package:
carte1 <- import.asc("MNT_Exposition_arcgid_3_ASCII.asc")
carte1
carte2 <- import.asc("MNT_pente_ASCII.asc")
carte2
carte3 <- import.asc("oso_theia_ASCII_Int16.asc")
carte3
carte4 <- import.asc("Dist_mares_ASCII_Int16.asc")
carte4
Then, I would like to gather the files in a "kasc" object using the function as.kasc :
cartetot <- as.kasc(list(expo = carte1,
+ pente = carte2,
+ osotheia = carte3,
+ distmare = carte4))
The problem is that when I enter these last lines of code, the software indicates an error and I don't understand where this can come from.
> cartetot <- as.kasc(list(expo = carte1,
+ + pente = carte2,
Erreur : '=' inattendu(e) in:
"cartetot <- as.kasc(list(expo = carte1,
+ pente ="
> + osotheia = carte3,
Erreur : ',' inattendu(e) in " + osotheia = carte3,"
> + distmare = carte4))
Erreur : ')' inattendu(e) in " + distmare = carte4)"
>
Would you have an answer to help me ?
Thanks a lot !