# open
genofile <- snpgdsOpen(snpgdsExampleFileName())
snpgdsGDS2PED(genofile, "tmp")
# close
snpgdsClose(genofile)
# PED ==> GDS
snpgdsPED2GDS("tmp.ped", "tmp.map", "test.gds")
# delete the temporary file
unlink(c("tmp.ped", "tmp.map", "test.gds"), force=TRUE)
Run the code above in your browser using DataLab