What is the noquote() function in R?
Overview
The noquote() function in R is used to print a character string without quotes.
Syntax
The syntax of the noquote() function is given below:
noquote(obj, right=FALSE)
Syntax of the "noquote()" function in R
Parameter values
The noquote() function takes the following parameter values:
obj: This represents a vector of character strings. It is a required parameter value.right: This takes a logical value that indicates whether the returned string should be right aligned or not. It is an optional parameter value.
Example
# implementing the prirt() and paste() functionprint("This is the print() function")paste("This is the paste() function")# implementing the noquote() functionnoquote("This is the noquote() function")
Explanation
- Lines 2–3: We return the character string arguments that were passed to the
print()andpaste()functions. - Line 6: We return the character string that has no quotes using the
noquote()function.