read_pheno | R Documentation |
Read phenotype data from a CSV file (and, optionally, phenotype covariate data from a separate CSV file). The CSV files may be contained in zip files, separately or together.
read_pheno(
file,
phenocovarfile = NULL,
sep = ",",
na.strings = c("-", "NA"),
comment.char = "#",
transpose = FALSE,
quiet = TRUE
)
file |
Character string with path to the phenotype data file (or a zip file containing both the phenotype and phenotype covariate files). |
phenocovarfile |
Character string with path to the phenotype
covariate file. This can be a separate CSV or zip file; if a zip
file, it must contain exactly one CSV file. Alternatively, if the
|
sep |
the field separator character |
na.strings |
a character vector of strings which are to be
interpreted as |
comment.char |
A character vector of length one containing a single character to denote comments within the CSV files. |
transpose |
If TRUE, the phenotype data will be transposed. The phenotype covariate information is never transposed. |
quiet |
If |
Either a matrix of phenotype data, or a list containing
pheno
(phenotype matrix) and phenocovar
(phenotype
covariate matrix).
read_cross2()
,
sample data files at https://kbroman.org/qtl2/pages/sampledata.html
and https://github.com/rqtl/qtl2data
## Not run:
file <- paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/main/Gough/gough_pheno.csv")
phe <- read_pheno(file)
phecovfile <- paste0("https://raw.githubusercontent.com/rqtl/",
"qtl2data/main/Gough/gough_phenocovar.csv")
phe_list <- read_pheno(file, phecovfile)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.