Learn R Programming

lineup (version 0.34-1)

findCommonID: Find individuals in common between a cross and a phenotype matrix

Description

Identify which individuals are in common between a QTL mapping data set and a matrix of phenotypes, series of genes.

Usage

findCommonID(id1, id2)

Arguments

id1
A character vector of individual IDs. This can also be a QTL cross object (see read.cross), in which case getid is used to grab individual IDs,
id2
Like id1, can be a character vector, a cross or a matrix/data frame.

Value

  • A list with three components: First, a data frame with rows corresponding to all individuals (across the two sets of individual IDs) and three columns: indexInFirst and indexInSecond contain numeric indices to the locations of the individuals within cross and pheno, and inBoth is a logical vector to indicate which individuals appear in both crosses. The row names are the individual identifiers.

    The second and third components are vectors of indices in id1 and id2, respectively, indicating the paired locations of the individuals that are in common.

See Also

calc.locallod, corbetw2mat

Examples

Run this code
id1 <- sample(LETTERS[1:5])
id2 <- LETTERS[3:8]
findCommonID(id1, id2)

x <- matrix(0, nrow=length(id2), ncol=3)
rownames(x) <- id2
findCommonID(id1, x)

Run the code above in your browser using DataLab