require(readxl)
require(future.apply)
plan(multisession)
coefTable <- read_xlsx(exampleData("exampleGosling.xlsx"))
# Subset to save computation time
coefTable <- coefTable[coefTable$indicator %in% c("Long-term income",
"Liquidity",
"Protecting soil resources"),]
obsLU <- data.frame(landUse = c("Pasture", "Crops", "Forest", "Plantation",
"Alley Cropping", "Silvopasture"),
share = c(0.59, 0.26, 0.14, 0.01, 0, 0))
combList <- autoSearch(coefTable = coefTable,
landUseObs = obsLU,
uValue = 2,
optimisticRule = "expectation",
fixDistance = 3)
plan(sequential)
Run the code above in your browser using DataLab