rlandscape: Creates a landscape object based on direct control...

Description Usage Arguments Value See Also Examples

Description

This function takes parameters such as the number of tiles, the proportion of final tiles that are holes and merged, control parameters for choosing random points. It calls random point processes to create a point patter, generates a Voronoi diagram based on the results, modifies the diagram as necessary and outputs a landscape object. pHole and pMerge can be set to any value in [0, 1), but larger values in this range will increase the runtime and are not recommended in general. The number of points picked is scaled up based on pHole and pMerge values so that the number of tiles in the landscape is very close to (usually equal to) sum(n). The control list can include any or all of the following elements:

The makePoints function has defaults for any control parameters not specified.

Usage

1
2
rlandscape(n = c(100, 0, 0, 0), hAsp = 1, pMerge = 0.1, pHole = 0.1,
  plot = FALSE, control = list(), filename = NULL, debug = FALSE, ...)

Arguments

n

a vector of the numbers of points to pick with each method: uniform, lattice, cluster, and SSI, respectively. If the vector is of length less than 4 it will be filled out with zeroes.

hAsp

numeric, the horizontal to vertical aspect ratio of the landscape.

pMerge

numeric between 0 and 1, the proportion of tiles in the landscape that have been merged with another tile. In practice, pMerge should be less than 0.5 or so. See 'Details'.

pHole

numeric between 0 and 1, the proportion of tiles in the final landscape that are deleted to become holes. In practie, pHole should be less than 0.5 or so. See 'Details'.

plot

boolean to indicate whether or not a plot is automatically produced. If you save the object returned, you can plot it later.

control

a list of control parameters passed to the makePoints function.

filename

a character string giving the prefix file name to be attached to saved output. Can include a file path. If NULL (the default) nothing will be saved.

debug

Run in debugging mode? (Uses browser().)

...

Additional arguments will be passed to the plot call if appropriate.

Value

A landscape object.

See Also

rland

Examples

1
2
3
4
5
6
7
8
myLand <- rlandscape()
myLand$stats
## Not run: 
plot(myLand)
myComplicatedLand <- rlandscape(n = c(20, 80, 40, 10), hAsp = 2, pMerge = 0.3,
    plot = TRUE, control = list(lattice = c(15, 15), ssi = 0.05))

## End(Not run)

gregorp/rlandscape documentation built on May 17, 2019, 8:36 a.m.