mid: Truncate Characters from the Inside

Description Usage Arguments Value Examples

View source: R/mid.R

Description

Truncate Characters from the Inside

Usage

1
mid(x, start, n = 1e+11)

Arguments

x

can be number, strings, verctors, dataframe or matrix.

start

starting position

n

length, n can be less than zero

Value

substring

Examples

1
2
3
4
5
6
7
8
mid("abcd",3,1)
mid(c("abc","gjh"),2,2)
df = data.frame(
  a = c(123,234,456),
  b = c("abc","bcd","hjg")
)
mid(df,2,1)
mid(df,2,-2)

do documentation built on July 16, 2021, 9:08 a.m.