Learn R Programming

ggroups (version 2.1.2)

Qgpu: Vector Qg + u

Description

Adds genetic group contributions to the genetic merit of individuals.

Usage

Qgpu(Q, sol)

Arguments

Q

: The output matrix from qmatL (for more details: ?qmatL)

sol

: data.frame with 2 numeric columns corresponding to ID, EBV ([, ]), where and are the genetic group and genetic merit solutions, respectively. The order of solutions must be the order of columns and the order of rows in matrix Q.

Value

Vector of Q +

Examples

Run this code
# NOT RUN {
ped = data.frame(ID=c(3,4,6,5), SIRE=c(1,3,4,1), DAM=c(2,2,5,2))
Q = qmatL(gghead(ped))
ghat = c(0.1, -0.2)
uhat = seq(-1.5, 1.5, 1)
sol = data.frame(ID=1:6, EBV=c(ghat, uhat))
Qgpu(Q, sol)

# }

Run the code above in your browser using DataLab