ClipLast: Clips out string after the last separator. eg...

View source: R/aux.R

ClipLastR Documentation

Clips out string after the last separator. eg B6-13W1-BM-H3K4me3-1_269 -> B6-13W1-BM-H3K4me3

Description

Clips out string after the last separator. eg B6-13W1-BM-H3K4me3-1_269 -> B6-13W1-BM-H3K4me3

Usage

ClipLast(x, jsep = "-", jsep.out = NULL)

Arguments

x

string containing a separator and text you want you clip out

jsep

separator, such as dash or underscore that matches in the text. If matches multiple times, will take the last match

jsep.out

Output separator, important if clipping "." you want to input "\." to escape the special character

Value

string with characters after separator clipped out

Examples

ClipLast("B6-13W1-BM-H3K4me3-1_269", jsep = "_", jsep.out = "_")

jakeyeung/scChIX documentation built on May 7, 2023, 9:14 a.m.