View source: R/value_functions.R
pheno | R Documentation |
Functions to extract phenotypic values, genotypic values, or predicted genotypic values.
pheno(pop, means = TRUE)
gv(pop)
pgv(pop)
meanG(pop)
varG(pop)
pop |
A 'pop' object. |
means |
For phenotypic data, should phenotypic means be returned, or all observations? |
Extract phenotypic values.
Extract genotypic values.
Extract predicted genotypic values.
Calculate the average genotypic value.
Calculate the population genetic variance.
gv
:
pgv
:
meanG
:
varG
:
# Simulate a genome
n.mar <- c(505, 505, 505)
len <- c(120, 130, 140)
genome <- sim_genome(len, n.mar)
# Simulate a quantitative trait influenced by 50 QTL
qtl.model <- matrix(NA, 50, 4)
genome <- sim_gen_model(genome = genome, qtl.model = qtl.model,
add.dist = "geometric", max.qtl = 50)
# Simulate the population
pop <- sim_pop(genome = genome, n.ind = 100)
# Generate phenotypes
pop <- sim_phenoval(pop = pop, h2 = 0.5)
## Extract genotypic values
gv(pop)
## Extract phenotypic values
pheno(pop)
## Try to get predicted phenotypic values. There are none, so this returns \code{NULL}.
pgv(pop)
# Predict genotypic values
pop <- pred_geno_val(genome = genome, training.pop = pop, candidate.pop = pop)
# Now extract predicted genotypic values
pgv(pop)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.