Learn R Programming

lares (version 4.8.4)

right: Right: Last n characters

Description

This function lets the user extract the last n characters of a string or vector of strings.

Usage

right(string, n = 1)

Arguments

string

String or Vector

n

Integer. How many characters from right to left?

See Also

Other Data Wrangling: balance_data(), categ_reducer(), cleanText(), date_cuts(), date_feats(), dateformat(), formatNum(), formatTime(), holidays(), impute(), left(), normalize(), numericalonly(), ohe_commas(), ohse(), rbind_full(), removenacols(), removenarows(), replaceall(), textFeats(), textTokenizer(), vector2text(), year_month(), year_week()

Examples

Run this code
# NOT RUN {
right("Bernardo", 3)
# }

Run the code above in your browser using DataLab