suitability | R Documentation |
This function determines soil condition classes (such as suitability, fertility, etc.) given a set of indicators.
suitability(df,data)
df |
normalized pairwise decision (nxn) matrix for comparing n soil suitability (condition) factors |
data |
a (nxm) matrix of n suitability (condition) factors for m locations (pixels) |
A vector of soil suitability (condition) class between 0 and 5.
It's important to normalize and assess the adequacy of the decision matrix before using this function
Christian Thine Omuto
FAO, 1976. A framework for land evaluation. FAO Soils Bulletin 32
Saaty TL. 1980. The Analytic Hierarchy Process. McGraw-Hill, New York
fertilityRating, suitabilityClass
library(sp)
newmap=(nutrindicator)
newmap$carbon=fertilityRating((nutrindicator$soc),"carbon")
newmap$nitrogen=fertilityRating((nutrindicator$nitrogen),"nitrogen")
newmap$potassium=fertilityRating((nutrindicator$potassium),"potassium")
newmap$phosphorus=fertilityRating((nutrindicator$phosphorus),"phosphorus")
newmap$iron=fertilityRating((nutrindicator$iron),"iron")
newmap$zinc=fertilityRating((nutrindicator$zinc),"zinc")
newmap$manganese=fertilityRating((nutrindicator$manganese),"manganese")
newmap$copper=fertilityRating((nutrindicator$copper),"copper")
newmap$cec=fertilityRating((nutrindicator$cec),"cec")
newmap$boron=fertilityRating((nutrindicator$boron),"boron")
newmap$sulfur=fertilityRating((nutrindicator$sulfur),"sulfur")
newmap$soc=NULL
newmapT1=newmap@data
valuT=as.matrix(newmapT1)
data("nutrient")
nutriens=comparisonTable(nutrient)
newmapT1$fertility=suitability(nutrient, valuT)
newmap@data$fertility=newmapT1$fertility
newmap$fertilityclass2=classCode(newmap$fertility,"fertility")
spplot(newmap["fertility"])
summary(newmap$fertilityclass2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.