The overall suitability can be computed using the overall_suit
function, which takes an object of class suitability. For example,
library(ALUES)
banana_suit <- suit("banana", terrain=MarinduqueLT)
## Warning in suitability(terrain, crop_soil, mf = mf, sow_month = NULL, minimum
## = minimum, : maximum is set to 16 for factor CECc since all parameter intervals
## are equal.
class(banana_suit[["terrain"]])
## [1] "character"
class(banana_suit[["soil"]])
## [1] "suitability"
There are no factors that were targetted for the terrain characteristics, hence the returned value is a string error. Thus, only the soil characteristics can have an overall suitability, and is computed as follows:
ovsuit <- overall_suit(banana_suit[["soil"]])
head(ovsuit)
## Score Class
## 1 0 N
## 2 0 N
## 3 0 N
## 4 0 N
## 5 0 N
## 6 0 N
By default, the overall_suit
function uses minimum as a summary statistics, hence the 0 scores and N classes across land units. To adjust this to average aggregation, use the method
argument to specify.
ovsuit <- overall_suit(banana_suit[["soil"]], method="average")
head(ovsuit)
## Score Class
## 1 0.6505051 S2
## 2 0.6569697 S2
## 3 0.6537374 S2
## 4 0.6537374 S2
## 5 0.6472727 S2
## 6 0.6656566 S2
By default, the overall_suit
uses an equally spaced interval for the suitability classes, that is, N [0, 0.25), S3 [0.25, 0.50), S2 [0.50, 0.75), and S1 [0.75, 1]. This can be changed using the interval
argument, for example
ovsuit <- overall_suit(banana_suit[["soil"]], method="average", interval=c(0, 0.6, 0.7, 0.9, 1))
head(ovsuit)
## Score Class
## 1 0.6505051 S3
## 2 0.6569697 S3
## 3 0.6537374 S3
## 4 0.6537374 S3
## 5 0.6472727 S3
## 6 0.6656566 S3
The above code sets the suitability class intervals into: N [0, 0.60), S3 [0.60, 0.70), S2 [0.70, 0.90), and S1 [0.90, 1]. It should be emphasized that the interval
argument cannot be set to unbias
as in the case of the interval
argument of the suit
function. This follows from the fact that the overall_suit
function is not using a membership function for computing the score, but an aggregation function.