r - 如何参数化geom_text中的label子句?
问题描述
想在其中创建一个带有 ggplot 的函数。如何参数化下面需要在多个函数调用之间变化的这个标签子句?
geom_text(aes(label = round(value, 3),
geom_text(aes(label = round(value / 1e06, 0),
geom_text(aes(label = 100 * round(value, 3),
我在想: label = p_label - 其中 p_label 将是等号右侧的所有内容,以逗号表示。这在R中可能吗?
传递字符串不起作用,尝试了c(),也没有运气。
解决方案
推荐阅读
- javascript - VueJs 启动时加载 gapi.auth2
- regex - 突出显示重复项,包括 Google 表格中的部分文本匹配
- sql - 如何在视图中使用 IF 语句来删除/使用#Temp 表?
- python-3.x - 对networkx中的图节点进行排序
- javascript - 如何从 highlight.js 元素中获取纯文本?
- javascript - axios 获取响应未定义
- git - Git diff 所有本地未提交的更改
- python - 如何从不同位置导入机器人文件
- python - 找到从列表中对每个整数求和获得的最小和
- ruby-on-rails - 使用 2 个 if 语句与 if/elsif?为什么一个有效而另一个无效