add.phenos: Create genetic and physical list of maps object.

Description Usage Arguments Details See Also Examples

Description

Add phenotypes to cross object.

Usage

1
add.phenos(cross, newdata = NULL, index = NULL)

Arguments

cross

Objects of class cross. See read.cross.

newdata

Data frame with one phenotype per column. Row names should correspond to index in cross object.

index

Numerical index or character name of phenotype in cross that corresponds to row names of newdata.

Details

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.

See Also

snp.record

Examples

 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)

byandell/qtlview documentation built on May 13, 2019, 9:53 a.m.