write.snp.matrix: Write a snp.matrix object as a text file

Description Usage Arguments Value Author(s) See Also

View source: R/outdata.R

Description

This function is closely modelled on write.table. It writes an object of class snp.matrix as a text file with one line for each row of the matrix. Genotpyes are written in numerical form, i.e. as 0, 1 or 2 (where 1 denotes heterozygous).

Usage

1
write.snp.matrix(x, file, append = FALSE, quote = TRUE, sep = " ", eol = "\n", na = "NA", row.names = TRUE, col.names = TRUE)

Arguments

x

The object to be written

file

The name of the output file

append

If TRUE, the output is appended to the designated file. Otherwise a new file is opened

quote

If TRUE, row and column names will be enclosed in quotes

sep

The string separating entries within a line

eol

The string terminating each line

na

The string written for missing genotypes

row.names

If TRUE, each row will commence with the row name

col.names

If TRUE, the first line will contain all the column names

Value

A numeric vector giving the dimensions of the matrix written

Author(s)

David Clayton david.clayton@cimr.cam.ac.uk

See Also

write.table, snp.matrix-class, X.snp.matrix-class


chopsticks documentation built on Nov. 8, 2020, 7:51 p.m.