readSampleAnnotationFile: Read in sample annotation file in the tsv-format, with or...

View source: R/readAnnotationFile.R

readSampleAnnotationFileR Documentation

Read in sample annotation file in the tsv-format, with or without row names

Description

Read in sample annotation file in the tsv-format, with or without row names

Usage

readSampleAnnotationFile(file, ...)

Arguments

file

A tab-delimited file without quotes, the first column must contain sample identifiers. In case the first column has no column name and it contains row names, they will be used as sample names.

...

Other parameters passed to readMatrix, which are further passed to read.table.

Value

A data.frame containing sample annotation, with the first column named as 'ExperimentName' that contains sample identifiers as character strings. In case the input table contains the column 'ExperimentName', the content in that column must match the row names, otherwise an error is reported.

Examples

f1 <- system.file("extdata",
  "sampleAnnotation/sampleAnnotationFile-withRowNames.txt", 
  package="ribiosExpression")
f2 <- system.file("extdata",
  "sampleAnnotation/sampleAnnotationFile-withoutRowNames.txt", 
  package="ribiosExpression")
f1Read <- readSampleAnnotationFile(f1)
f2Read <- readSampleAnnotationFile(f2)
head(f1Read)
head(f2Read)

bedapub/ribiosExpression documentation built on Sept. 2, 2023, 4:37 a.m.