在R中,如何从A到Z打印字符列表?使用整数,我可以说:
my_list = c(1:10)
> my_list
[1] 1 2 3 4 5 6 7 8 9 10
但是我可以对角色做同样的事情吗?例如
my_char_list = c(A:Z)
my_char_list = c("A":"Z")
这些不起作用,我希望输出为:
"A" "B" "C" "D"
,或用逗号分隔。 最佳答案
LETTERS
"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 - 如何从A到Z打印字符列表?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2456864/