A reference class for storing a pointer to a mapped version of a bed file.
Path to file with extension ".bed" to read. You need the corresponding ".bim" and ".fam" in the same directory.
bed object has many field:
$address: address of the external pointer containing the underlying
C++ object, to be used internally as a
XPtr<bed> in C++ code
$bedfile: path to the bed file
$bimfile: path to the corresponding bim file
$famfile: path to the corresponding fam file
$prefix: path without extension
$nrow: number of samples in the bed file
$ncol: number of variants in the bed file
$map: data frame read from
$fam: data frame read from
$light: get a lighter version of this object for parallel algorithms
to not have to transfer e.g.
bedfile <- system.file("extdata", "example-missing.bed", package = "bigsnpr") (obj.bed <- bed(bedfile)) #> A 'bed' object with 200 samples and 500 variants.