library(SNPRelate)
# PLINK BED files
bed.fn <- system.file("extdata", "plinkhapmap.bed.gz", package="SNPRelate")
fam.fn <- system.file("extdata", "plinkhapmap.fam.gz", package="SNPRelate")
bim.fn <- system.file("extdata", "plinkhapmap.bim.gz", package="SNPRelate")
# convert
seqBED2GDS(bed.fn, fam.fn, bim.fn, "tmp.gds")
seqSummary("tmp.gds")
# remove the temporary file
unlink("tmp.gds", force=TRUE)
Run the code above in your browser using DataLab