make.landscape: Create the landscape of optimal phenotypic values

Description Usage Arguments Value Author(s) Examples

View source: R/SelectionLandscape.R

Description

Create the landscape of optimal phenotypic values over which the patches will exist. Size should match the number of cells in the x and y directions on the landscape. A figure is created to visualize the landscape as well as the matrix of values output to a file for use in the make.input function.

Usage

1
2
3
make.landscape(horizontal.patches, vertical.patches, range, sill = 1,
  magnitude = 0, directionality = 1, nearest.obs = 20, scale.to = 1,
  cylinder = FALSE)

Arguments

horizontal.patches

Number of patches in the horizontal, x direction.

vertical.patches

Number of patches in the vertical, y direction.

range

The distance at which covariance between patches goes to zero, i.e. how similar is each grain to the next. A larger value makes the landscape smoother.

sill

The scale of the variance. See ?vgm, this is the sill of the variogram model component. A larger value makes the landscape more patchy. Default value is 1.

magnitude

The first beta parameter for simple kriging in the gstat function. Default is zero.

directionality

The second beta parameter for simple kriging in the gstat function. Default is 1. Larger values smooth the change in the direction of change.

nearest.obs

Used for local kriging, see ?gstat: the number of nearest observations that should be used for a kriging prediction or simulation. Default is 20.

scale.to

Value to scale down the magnitude of change in optima over the total landscape. Default is 1, which scales the total change to approximately -1 to 1 across the full landscape, whereas, e.g. a value of 5 allows a higher degree of change across the landscape, approximately -5 to 5.

cylinder

If the landscape is meant to be simulated as a cylinder, where the horizontal edges match up for individuals to disperse across, this should be set to true. This will halve the vertical length and mirror the landscape so that to horizontal edges match where they meet. Currently this capability is not yet coded in.

Value

Returns the mean value of the first column of patches at the leftmost end of the landscape. Also prints to a file the matrix of values for the landscape, to be uses as "selection_local_optima" in Nemo, and additionally visualizes the landscape.

Author(s)

Kimberly J Gilbert

Examples

1
make.landscape(horizontal.patches=50, vertical.patches=25, range=5, sill=1)

kjgilbert/aNEMOne documentation built on May 20, 2019, 10:25 a.m.