readCovarCSV: Read covariate matrix from a CSV file.

Description Usage Arguments Details Value See Also

View source: R/csv.R

Description

This function reads a table of covariates (with optional 'ID' column) from a CSV file and returns a numeric matrix of covariate data. Sample IDs are not included in the returned matrix, as R/qtl matches the covariate matrix row-by-row to the sample rows of the cross object. The contents of the input table do not need to be numeric, but they will be converted to numeric values when being read from file. For example, columns containing character values are read as factors, which are converted to their numeric representation.

Usage

1
readCovarCSV(infile, cross = NULL)

Arguments

infile

Input CSV file path.

cross

An R/qtl cross object.

Details

If a cross object is specified, the covariate matrix is matched sample-by-sample to the given cross; matching per-sample requires that sample IDs are included in both the covariate file and the given cross object.

Value

A numeric matrix of covariate data.

See Also

Other CSV functions: hasMapCSV, readCrossCSV, readGenoCSV, readMapCSV, readMapframeCSV, readPhenoCSV, recodeCSV, sniffCSV, writeCrossCSV, writeGenoCSV, writeMapCSV, writeMapframeCSV, writePhenoCSV


gact/shmootl documentation built on Nov. 11, 2021, 6:23 p.m.