R语言 打印没有引号的字符串 – noquote()函数

R语言 打印没有引号的字符串 – noquote()函数

R语言中的 noquote() 函数用于打印不带引号的字符串。

语法: noquote(x)

参数:

x: 字符向量

例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)
R

输出:

[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
R

例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)
R

输出

[1] "GFG"
[1] GFG
R

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程

登录

注册