Learn R Programming

gsrc (version 1.1)

rename_samples: Rename sample names

Description

Rename sample names

Usage

rename_samples(dat, ...)
"rename_samples"(dat, samples, suffix = NULL, ...)
"rename_samples"(dat, samples, ...)

Arguments

dat
List object, containing at least two matrices "intensity" and "theta". Or matrix with raw data.
...
Placeholder for generic function.
samples
Matrix or data.frame with two columns: 1. (prefix of) colnames of dat and 2. meaningful sample name.
suffix
Vector of two characters (e.g. c("Grn.idat", "Red.idat")) describing which suffix should be appended to the sample name.

Value

List with two matrices "intensity" (signal intensities) and "theta" (genotype value).

Examples

Run this code
if(require(brassicaData)){
data(raw_napus, package = "brassicaData")
samples <- read_sample_sheets(files = list.files(system.file("extdata",
package = "brassicaData"), full.names = TRUE, pattern = "csv"))
raw_napus <- rename_samples(raw_napus, samples = samples[,2:1], suffix = c("_Grn", "_Red"))
}

Run the code above in your browser using DataLab