Learn R Programming

snpStatsWriter (version 1.5-6)

write.sbams: write.sbams

Description

write an sbams format file

Usage

write.sbams(X, response, file)

Arguments

response
vector or matrix of response variables. rows index subjects, columns index variables
X
SnpMatrix object
file
Output file name.

Value

No return value, but has the side effect of writing specified output file.

Details

sbams is software from Xiaoquan Wen at https://github.com/xqwen/sbams

Examples

Run this code
data(testdata,package="snpStats")
A.small <- Autosomes[1:6,1:10]
R <- matrix(rnorm(12),ncol=2)
colnames(R) <- c("var1","var2")
f <- tempfile()

## write in suitable format for sbams
write.sbams(X=A.small, response=R, file=f)
unlink(f)

Run the code above in your browser using DataLab