Learn R Programming

ALUES (version 0.2.1)

suit: Suitability Scores/Class of the Land Units

Description

This function calculates the suitability scores and class of the land units.

Usage

suit(
  crop,
  terrain = NULL,
  water = NULL,
  temp = NULL,
  mf = "triangular",
  sow_month = NULL,
  minimum = NULL,
  maximum = "average",
  interval = NULL,
  sigma = NULL
)

Arguments

crop

a string for the name of the crop;

terrain

a data frame for the terrain characteristics of the input land units;

water

a data frame for the water characteristics of the input land units;

temp

a data frame for the temperature characteristics of the input land units;

mf

membership function with default assigned to "triangular" fuzzy model. Other fuzzy models included are "trapezoidal" and "gaussian".

sow_month

sowing month of the crop. Takes integers from 1 to 12 (inclusive), representing the twelve months of the year. So if sets to 1, the function assumes sowing month to be January.

minimum

factor's minimum value. If NULL (default), minimum is set to 0. But if numeric of length one, say 0.5, then minimum is set to 0.5, for all factors. To set multiple minimums for multiple factors, simply concatenate these into a numeric vector, the length of this vector should be equal to the number of factors in input land units parameters. However, it can also be set to "average", please refer to the online documentation for more, link in the "See Also" section below.

maximum

maximum value for factors. To set multiple maximums for multiple factors, simply concatenate these into a numeric vector, the length of this vector should be equal to the number of factors in input land units parameters. However, it can also be set to "average", please refer to the online documentation for more, link in the "See Also" section below.

interval

domains for every suitability class (S1, S2, S3). If fixed (NULL), the interval would be 0 to 25% for N (Not Suitable), 25% to 50% for S3 (Marginally Suitable), 50% to 75% for S2 (Moderately Suitable), and 75% to 100% for (Highly Suitable). If "unbias", the package will take into account the shape of the membership function, and provide the appropriate suitability class intervals. However, it can also be customized by specifying the limits of the suitability classes. Please refer to the online documentation for more, link in the "See Also" section below.

sigma

If mf = "gaussian", then sigma represents the constant sigma in the Gaussian formula.

Value

A list of outputs of target characteristics, with the following components:

  • "terrain" - a list of outputs for terrain characteristics

  • "soil" - a list of outputs for soil characteristics

  • "water" - a list of outputs for water characteristics

  • "temp" - a list of outputs for temperature characteristics

These components are only available when specified as the target characteristics in either of the arguments above, that is, if terrain argument is specified above, then the "terrain" and "soil" components will be available in the output list. This is also true if water and temp are specified in the arguments above.

Each of the components returned above contains a list of outputs as well with the following components:

  • "Factors Evaluated" - a character of factors that matched between the input land units factor and the targetted crop requirement factor

  • "Suitability Score" - a data frame of suitability scores for each of the matched factors

  • "Suitability Class" - a data frame of suitability classes for each of the matched factors

  • "Factors' Minimum Values" - a numeric of minimum values used in the membership function for computing the suitability scores

  • "Factors' Minimum Values" - a numeric of maximum values used in the membership function for computing the suitability scores

  • "Factors' Weights" - a numeric of weights of the factors specified in the input crop requirements

  • "Crop Evaluated" - a character of the name of the targetted crop requirement dataset

See Also

https://alstat.github.io/ALUES/

Examples

Run this code
# NOT RUN {
library(ALUES)

rice_suit <- suit("ricebr", water=MarinduqueWater, temp=MarinduqueTemp, sow_month = 1)
lapply(rice_suit[["water"]], function(x) head(x)) # access results for water suitability
lapply(rice_suit[["temp"]], function(x) head(x)) # access results for temperature suitability
rice_suit <- suit("ricebr", terrain=MarinduqueLT)
lapply(rice_suit[["terrain"]], function(x) head(x))
lapply(rice_suit[["soil"]], function(x) head(x))
# }

Run the code above in your browser using DataLab