Learn R Programming

MoBPS (version 1.13.1)

get.index: Putting together indices for GxE / multi trait

Description

Function to put together indices for GxE / multi trait

Usage

get.index(
  population,
  traits = NULL,
  locations = NULL,
  trait.weights = NULL,
  location.weights = NULL
)

Value

Index

Arguments

population

Population list

traits

Which traits to include in the index (all weight with factor 1)

locations

Which locations to include in the index (all weight weight factor 1)

trait.weights

Vector with a weight per trait

location.weights

Vector weight a weight per location

Examples

Run this code
population = creating.diploid(nsnp =1000, nindi = 100)
population = creating.trait(population, n.additive = c(10,10), n.location=3, replace.traits = TRUE)
get.index(population, trait.weights = c(1,2), location.weights = c(1,2,3))

Run the code above in your browser using DataLab