Open In App

Convert String from Uppercase to Lowercase in R programming – tolower() method

Last Updated : 10 May, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

tolower() method in R programming is used to convert the uppercase letters of string to lowercase string.

Syntax: tolower(s)

Return: Returns the lowercase string.

Example 1:




# R program to convert string
# from uppercase to lowercase
gfg <- "GeEks FoR GeeKs"
  
# Using tolower() method
answer <- tolower(gfg)
  
print(answer)


Output:

[1] "geeks for geeks"

Example 2:




# R program to convert string
# from uppercase to lowercase
  
# Given String
gfg <- "The QuiCk bRown FoX jUmpS oVer tHe LaZy dOG"
  
# Using tolower() method
answer <- tolower(gfg)
  
print(answer)


Output:

[1] "the quick brown fox jumps over the lazy dog"

Similar Reads

Convert string from lowercase to uppercase in R programming - toupper() function
toupper() method in R programming is used to convert the lowercase string to uppercase string. Syntax: toupper(s) Return: Returns the uppercase string. Example 1: # R program to convert string # from lowercase to uppercase # Given String gfg &lt;- &quot;Geeks For Geeks&quot; # Using toupper() method answer &lt;- toupper(gfg) print(answer) Output: [
1 min read
Case conversion of a String in R Language - toupper(), tolower(), casefold() and cartr() Function
In this article, we are going to see case conversion of a string in R Programming Language. R - toupper() toupper() function in R Language is used to convert the lowercase letters to uppercase. Syntax: toupper(x) Parameters: x: character vector Example: C/C++ Code # R program to illustrate # uppercase of vectors # Create example character string x
2 min read
Convert First letter of every word to Uppercase in R Programming - str_to_title() Function
str_to_title() Function in R Language is used to convert the first letter of every word of a string to Uppercase and the rest of the letters are converted to lower case. Note: This function uses 'stringr' library. Syntax: str_to_title(string) Parameter: string: string to be converted Example 1: # R Program to illustrate # the use of str_to_title fu
1 min read
Convert type of data object in R Programming - type.convert() Function
type.convert() function in R Language is used to compute the data type of a particular data object. It can convert data object to logical, integer, numeric, or factor. Syntax: type.convert(x) Parameter: x: It can be a vector matrix or an array Example 1: Apply type.convert to vector of numbers # R program to illustrate # type.convert to vector of n
2 min read
Convert String to Double Quote Text in R Programming - dQuote() Function
dQuote() function in R Language is used to convert the given string or character vector into double quote text. Syntax: dQuote(x) Parameters: x: specified string, character vector Example 1: # R program to illustrate # dQuote function # Initializing a string x &lt;- &quot;GeeksforGeeks&quot; # Calling the dQuote() function dQuote(x) Output : [1] "“
1 min read
Convert String to Single Quote Text in R Programming - sQuote() Function
sQuote() function in R Language is used to convert the given string or character vector into single quote text. Syntax: sQuote(x) Parameters: x: specified string, character vector Example 1: # R program to illustrate # sQuote function # Initializing a string x &lt;- &quot;GeeksforGeeks&quot; # Calling the sQuote() function sQuote(x) Output : [1] "‘
1 min read
Convert String to Integer in R Programming - strtoi() Function
strtoi() function in R Language is used to convert the specified string to integers. Syntax: strtoi(x, base=0L) Parameters: x: character vector base: integer between 2 and 36 inclusive, default is 0 Example 1: # R program to illustrate # strtoi function # Initializing some string vector x &lt;- c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;) y &lt;-
1 min read
Convert a String into Date Format in R Programming - as.Date() Function
as.Date() function in R Language is used to convert a string into date format. Syntax: as.Date(x, format) Parameters: x: string variable format: Format in which string is declared(%m/%d/%y) Example 1: # R program to convert string into date # Creating a string vector dates &lt;- c(&quot;27 / 02 / 92&quot;) # Conversion into date format result&lt;-a
1 min read
Convert an Object to a String in R Programming - toString() Function
toString() function in R Language is used to convert an object into a single character string. Syntax: toString(x, width) Parameters: x: Object width: maximum string width Example 1: # R program to convert an object to string # Creating a vector x &lt;- c(&quot;Geeks&quot;, &quot;for&quot;, &quot;geeks&quot;) # Calling toString() Function toString(
1 min read
Convert a String to an Expression in R Programming - parse() Function
parse() function in R Language is used to convert an object of character class to an object of expression class. Syntax: parse(text = character) Parameters: character: Object of character class Example 1: # R program to convert # character to expression # Creating an object of character class x &lt;- &quot;sin(pi / 2)&quot; # Class of object class(
1 min read
Article Tags :