upperleft | R Documentation |
Function to upper-case the first n-characters of a string from the left-hand side.
upperleft(fac, n = 1)
fac |
is an object of class string or factor |
n |
is the number of characters to be converted of a the
string given in |
It is specially set to arrange data vector having alphanumeric (i.e., letters) format.
This function returns an object having the first n-characters from the left-hand side in upper-case.
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
fac.x<-"willkommen"
upperleft(fac.x)
upperleft(fac.x,n = 2)
upperleft(fac.x,2)
upperleft(fac.x,3)
#A longer vector of characters
fac.x<-c("willkommen","welcome","bem-vindo","bievenido")
upperleft(fac.x,1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.