问题
How to get from
input = c("a", "b", "c")
to
output = c(quote(a), quote(b), quote(c))
automatically?
回答1:
List apply as.symbol() to your input vector.
lapply(X = input, as.symbol)
来源:https://stackoverflow.com/questions/50710103/r-how-to-go-from-a-vector-of-strings-to-a-vector-of-quotes-names