sampleinfo_gsub {sampleInfo} R Documentation

do text replace of the sample group label

Description

Usage

sampleinfo_gsub(sampleinfo, find, replace.as);

Arguments

sampleinfo

the sample information data, which can be a vector of the SampleInfo object or a pipeline object that produces a set of the sample information data.

find

a character vector of the text pattern for search in the sample group label of each sample data.

replace.as

the text for replace all of the found text pattern in the sample group label. [as string]

env

the R# runtime environment object. [as Environment]

Details

this api is helpful for merge the sample groups in a simple manner: replace the different group label text as a common group label text, then all of these sample data will be merged into the same sample group.

Authors

phenotype_kit

Value

a new vector of the SampleInfo object that the sample_info group label of each sample data has been replaced;

this function returns a R# error message object if the input data can not be cast to a collection of the sample information data.

clr value class

Examples

 imports "sampleInfo" from "phenotype_kit";
 
 # merge the sample groups of "treat-1h" and "treat-2h" 
 # into a single sample group of "treat"
 let samples = sampleinfo_gsub(samples, find = c("-1h", "-2h"), replace_as = "");

[Package sampleInfo version 1.0.0.0 Index]