extractRight | R Documentation |
Function to extract the last n-characters of a string from the right-hand side.
extractRight(fac, n)
fac |
is an object of class string or factor |
n |
is the number of characters to be deleted of a the string given in 'fac'. |
It is specially set to arrange data vector having alphanumeric format.
This function returns an object having the last n characters from the right-hand side.
Christian Salas-Eljatib
Salas-Eljatib, C. 2021. Análisis de datos con el programa estadístico R: una introducción aplicada. Ediciones Universidad Mayor, Santiago, Chile. 170 p. https://eljatib.com/rlibro
last.names.id <- c("Stage-1924","Gregoire-1958","Robinson-1967")
extractRight(last.names.id,4)
extractRight(last.names.id,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.