Learn R Programming

Orcs (version 1.2.3)

substrC: Substrings of a Character Vector (C++ Style)

Description

Extract substrings from a character vector in C++.

Usage

substrC(x, pos, len)

Value

A character vector of the same length as 'x'.

Arguments

x

A character vector.

pos

The start point of the substring as integer. Position indications start from 1L, which is the default in R.

len

The length of the substring as integer.

See Also

Examples

Run this code
substrC("Hello, world!", pos = 1, len = 5)

Run the code above in your browser using DataLab