我一直在使用dplyr的quo表达式:
library(dplyr)
library(ggplot2)
thing <- quo(clarity)
diamonds %>% select(!!thing)
print(paste("looking at", thing))
[1] "观察~" "观察清晰度"
我真的想打印出放入引号中的字符串值,但只能得到以下内容:
print(thing)
(Note: This is already in Chinese as it was provided in English and translated to Chinese by the user)<quosure: global>
~clarity
print(thing[2])
清晰度()
substr(thing[2],1, nchar(thing[2]))
[1] "清晰度"
有没有更简单的方法来"取消引用"一个quo()?