Skip to contents

Calculate contiguity bonuses based on landuse similarity and writes them to a .dat file. The file will be written to the location specified by the name argument. If the file already exists, it will be overwritten. The file format is plain text, with each line terminated by a newline character.

Usage

LanduseCombination(
  Landuses,
  Filters,
  parameter = "ContiguityBonus",
  name = "Problem",
  verbose = FALSE
)

Arguments

Landuses

is a character vector of the land-uses names

Filters

Commonalities to look for in land-uses

parameter

The name of the parameter to use

name

The name of the output file

verbose

Logical whether messages will be written while the function is generating calculations, defaults to FALSE

Value

.dat file. This function is used for the side-effect of writing values to a file.

Examples




LanduseCombination(Landuses = c("ForestDryPoor",
"ForestDryRich", "ForestWetPoor",
"ForestWetRich", "OpenDryPoor", "OpenDryRich", "OpenWetPoor",
"OpenWetRich"), Filters = c("Dry", "Wet"))
#>           used (Mb) gc trigger  (Mb) max used  (Mb)
#> Ncells 1611167 86.1    3056375 163.3  2292968 122.5
#> Vcells 2410509 18.4    8388608  64.0  3298437  25.2

file.remove("Problem.dat")
#> [1] TRUE