ExtractField: Extract delimiter information from a string.

View source: R/utils.R

ExtractFieldR Documentation

Extract delimiter information from a string.

Description

Parses a string (usually a cell name) and extracts fields based on a delimiter

Usage

ExtractField(string, field = 1, delim = "_")

Arguments

string

String to parse.

field

Integer(s) indicating which field(s) to extract. Can be a vector multiple numbers.

delim

Delimiter to use, set to underscore by default.

Value

A new string, that parses out the requested fields, and (if multiple), rejoins them with the same delimiter

Examples

ExtractField('Hello World', field = 1, delim = '_')


SeuratObject documentation built on May 29, 2024, 12:31 p.m.