在 R 编程中打印不带引号的字符串 - noquote()函数
R 语言中的noquote()
函数用于打印不带引号的字符串。
Syntax: noquote(x)
Parameters:
x: character vector
示例 1:
# R program to illustrate
# noquote function
# Getting letters without the help
# of noquote() function
letters
# Getting letters with the help
# of noquote() function
noquote(letters)
输出 :
[1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s"
[20] "t" "u" "v" "w" "x" "y" "z"
[1] a b c d e f g h i j k l m n o p q r s t u v w x y z
示例 2:
# R program to illustrate
# noquote function
# Initializing a string
x <- "GFG"
# Getting the string without the help
# of noquote() function
x
# Getting the string with the help
# of noquote() function
noquote(x)
输出:
[1] "GFG"
[1] GFG