powered by
Write a SNP object to the files in the binary PLINK format. For more information about the binary PLINK format, please check in the manual of PLINK.
write.bed(object, file)
An object of SNP is a list consisting of 3 matrices, see the Details section for more details.
A prefix of output files for BED, BIM and FAM to be saved.
NULL.
NULL
The object should contain:
object
$snp is a SNP matrix from BED file.
$snp
$snp.info is a data.frame of SNP information from BIM file.
$snp.info
$ind.info is a data.frame of individual information from FAM file.
$ind.info
For more details about the binary PLINK format, please check http://zzz.bwh.harvard.edu/plink/binary.shtml
read.bed
# NOT RUN { #Load example data data(example_SNP) #Save 'simsnp' to the file as defined in 'save.file' save.file <- file.path(tempdir(),"new_SNP") write.bed(simsnp , save.file) # }
Run the code above in your browser using DataLab