left {lares} | R Documentation |
Left or Right N characters of a string
Description
This functions lets the user extract the first or last n characters of a string or vector of strings.
Usage
left(string, n = 1)
right(string, n = 1)
Arguments
string |
String or Vector. |
n |
Integer. How many characters starting on right/left? |
Value
Character. Trimmed strings.
See Also
Other Data Wrangling:
balance_data()
,
categ_reducer()
,
cleanText()
,
date_cuts()
,
date_feats()
,
file_name()
,
formatHTML()
,
holidays()
,
impute()
,
normalize()
,
num_abbr()
,
ohe_commas()
,
ohse()
,
quants()
,
removenacols()
,
replaceall()
,
replacefactor()
,
textFeats()
,
textTokenizer()
,
vector2text()
,
year_month()
,
zerovar()
Examples
left("Bernardo", 3)
right(c("Bernardo", "Lares", "V"), 3)
[Package lares version 5.2.8 Index]