Learn R Programming

qtl (version 1.70)

table2map: Convert a table of marker positions to a map object.

Description

Convert a data frame with marker positions to a map object.

Usage

table2map(tab)

Value

A map object: a list whose components (corresponding to chromosomes) are vectors of marker positions.

Arguments

tab

A data frame with two columns: chromosome and position. The row names are the marker names.

Author

Karl W Broman, broman@wisc.edu

See Also

map2table, pull.map, est.map

Examples

Run this code
tab <- data.frame(chr=c(1,1,1,1,2,2,2,2,3,3,3,3),
                  pos=c(0,2,4,8,0,2,4,8,0,2,4,8))
rownames(tab) <- paste0("marker", 1:nrow(tab))

map <- table2map(tab)

Run the code above in your browser using DataLab