Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道,当使用诸如(https://github.com/r-lib/crayon)crayon之类的功能手动要求这样做时,像这样的包可以使 RStudio 控制台输出显示为各种颜色。blue()
crayon
blue()
然而,真正令人敬畏的是一个包或 RStudio 插件,如果它们是颜色字符名称或十六进制字符串,它会自动在控制台中为字符串着色。以这个向量为例:
c("blue", "#ff00ff", "#CCE6FF")
在控制台中打印它看起来像这样
有没有办法做到这一点?
编辑:显然不是 - 请参阅我对这个问题的回复。