## chromosomes 1-22
hapmap <- lapply(1:22, hapmap.read.haplotypes, path = "~/hapmap")
## selected chromosomes only
hapmap <- lapply(1:22, function() return(NULL))
for (chr in c(1, 11, 17)) {
hapmap[[chr]] <- hapmap.read.haplotypes(chr, path = "~/hapmap")
}Run the code above in your browser using DataLab