给字符串添加引号
2021-02-20 本文已影响0人
R语言数据分析指南
string <- function(...) {
dots <- as.list(substitute(...))
vapply(dots,as.character,FUN.VALUE = character(1))[-1]
}
string(c(a,b,c))
> string(c(a,b,c))
[1] "a" "b" "c"
string <- function(...) {
dots <- as.list(substitute(...))
vapply(dots,as.character,FUN.VALUE = character(1))[-1]
}
string(c(a,b,c))
> string(c(a,b,c))
[1] "a" "b" "c"