mid | R Documentation |
Truncate Characters from the Inside
mid(x, start, n = 1e+11)
x |
can be number, strings, verctors, dataframe or matrix. |
start |
starting position |
n |
length, n can be less than zero |
substring
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.