Learn R Programming

gaston (version 1.4.9)

as.bed.matrix: Creation of a bed.matrix

Description

Creates a bed.matrix using a numeric matrix and two data frame for ped / snps slots

Usage

as.bed.matrix(x, fam, bim)

Arguments

x
A numeric matrix
fam
(Optionnal) A data frame (the contents of a .fam file)
bim
(Optionnal) A data frame (the contents of a .bim file)

Value

A bed.matrix condensing all three arguments.

Details

The data frame fam should have columns named "famid", "id", "father", "mother", "sex" and "pheno". The data frame bim should have columns named "chr", "id", "dist", "pos", "A1" and "A2".

See Also

bed.matrix-class

Examples

Run this code
data(AGT)
x <- as.bed.matrix(AGT.gen, AGT.fam, AGT.bim)
x

Run the code above in your browser using DataLab