sim.spatial: Simulate a spatial structure

Description Usage Arguments Details Value

View source: R/AllGeneric.R

Description

Takes a metagene simulated dataset and distributes its individuals randomly into a more or less square spatial region. Furthermore, it takes part of the phenotypic noise and puts some spatial structure into it.

Usage

1
sim.spatial(meta, variance, range, ...)

Arguments

meta

A metagene object

variance

A number between 0 and 1. The variance of the spatial field as a proportion of the non-inheritable phenotypic variance. See Details.

range

A number between 0 and 1. The range of the spatial field, as a proportion of the region size.

...

Arguments to be passed to methods.

Details

Founders are not put into place, as they don't have phenotypic values. Therefore, they are returned without coordinates nor spatial values.

The variance of the spatial field is given as a proportion of the variance of the random noise that was added to the Breeding Values to produce the phenotypes. The phenotypes are afterwards recalculated to preserve the heritability.

The spatial unit is the distance between consecutive trees.

Value

Another metagene object with spatial structure given through an additional column sp_X with the spatially structured component of the phenotype, and a 'spatial' list element with coordinates and simulation information


famuvie/breedR documentation built on Sept. 6, 2021, 4:50 a.m.