Description Usage Arguments Details See Also Examples
Add phenotypes to cross object.
1 | add.phenos(cross, newdata = NULL, index = NULL)
|
cross |
Objects of class |
newdata |
Data frame with one phenotype per column. Row names should correspond to |
index |
Numerical index or character name of phenotype in |
Returns the cross
object with added phenotypes.
No change if newdata
is NULL
.
Assumes newdata
are in same individual order as cross
if index
is NULL
; otherwise, matches row names of newdata
to the phenotype identified by index
.
1 2 3 4 5 6 7 8 9 10 11 | data(hyper)
newdata <- data.frame(x = rnorm(nind(hyper)))
cross <- add.phenos(hyper, newdata)
summary(cross)
## Use of index. First need to create one.
newdata <- data.frame(myindex = seq(nind(cross)))
cross <- add.phenos(cross, newdata)
newdata <- data.frame(y = rnorm(100))
row.names(newdata) <- sample(seq(nind(cross)), 100)
cross <- add.phenos(cross, newdata)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.