# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())
# to get a snp list object
snplist1 <- snpgdsSNPList(genofile)
snplist2 <- snpgdsSNPList(genofile)
# a common snp list
snplist <- snpgdsSNPListIntersect(snplist1, snplist2)
summary(snplist$afreq)
# close the file
snpgdsClose(genofile)
Run the code above in your browser using DataLab