How to convert a string to lowercase in R
The tolower() function in R converts a string to lowercase.
The following figure shows a visual representation of the tolower() function.
Syntax
tolower(string)
Parameter
As a parameter, the tolower() function requires a string which is to be converted to lowercase.
Return value
The tolower() function returns a string that is converted to lowercase.
Code
The code below shows how the tolower() function works in R.
#Stringa <- tolower("EDUCATIVE");print(paste0("tolower('EDUCATIVE'): ", a))#String with numberb <- tolower("EDUCATIVE09");print(paste0("tolower('EDUCATIVE09'): ", b))