| read.bed.matrix {gaston} | R Documentation | 
 Read a bed.matrix 
Description
Create a bed.matrix from a .bed file, and either
a .rds file or a .bim and a .fam file.
Usage
read.bed.matrix(basename, bed = paste(basename, ".bed", sep=""), 
                          fam = paste(basename, ".fam", sep=""),
                          bim = paste(basename, ".bim", sep=""), 
                          rds = paste(basename, ".rds", sep=""),
                          verbose = getOption("gaston.verbose",TRUE))
Arguments
| basename | Basename of all files | 
| bed |  Name of the  | 
| fam |  Name of the  | 
| bim |  Name of the  | 
| rds |  Name of the  | 
| verbose |  If  | 
Details
The .bed, .fam and .bim files follow the PLINK specifications
(http://zzz.bwh.harvard.edu/plink/binary.shtml).
If a .rds file exists (created by write.bed.matrix), 
the .fam and .bim files will be ignored. 
To ignore an existing .rds file, set rds = NULL.
If the .bed file does not exist, and basename ends by ".bed",
the function will try to generate a new basename by trimming the extension out. This
allows to write read.bed.matrix("file.bed") instead of read.bed.matrix("file").
If the option gaston.auto.set.stats is set to TRUE (the default), 
the function set.stats will be called before returning the bed.matrix,
unless a .rds file is present: in this case, the bed.matrix obtained
is identical to the bed.matrix saved with write.bed.matrix.
Value
Author(s)
Hervé Perdry and Claire Dandine-Roulland
See Also
Examples
# Read RDS and bed files
x <- read.bed.matrix( system.file("extdata", "LCT.bed", package="gaston") )
x