R 在哪里可以找到“geom_line”中“fun”参数的文档?
我正在学习关于R的Udacity课程,其中一个练习让我写下这段代码,以便绘制散点图并覆盖一条“平均”线和三条“四分位”线 我想查看R 在哪里可以找到“geom_line”中“fun”参数的文档?,r,ggplot2,R,Ggplot2,我正在学习关于R的Udacity课程,其中一个练习让我写下这段代码,以便绘制散点图并覆盖一条“平均”线和三条“四分位”线 我想查看geom_line中fun参数的文档,因此我查看了geom_line的文档(在R Studio和在线),并且geom_line函数显示为 geom_line(mapping = NULL, data = NULL, stat = "identity", position = "identity", na.rm = FALSE, show.legend = NA, i
geom_line
中fun
参数的文档,因此我查看了geom_line
的文档(在R Studio和在线),并且geom_line
函数显示为
geom_line(mapping = NULL, data = NULL, stat = "identity", position = "identity",
na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...)
我在任何地方都看不到
fun
参数。因此,我的问题是:如果我还没有了解Udacity课程中的fun
参数,那么我如何通过查看文档了解它,以及如何获取更多信息?简短版本:
在?stat\u summary
中,我们找到了fun.y
参数
如何到达那里:
首先检查?geom\u line
中的参数。在这里我们可以找到“省略号参数”…
:
…
传递到层的其他参数
然后按照链接到?层
:
通常使用geom.*
或stat.*
在您的例子中,您使用了包装器geom\u line
(而不是层(geom=“line”,
)和stat=“summary”
。后者导致我们使用stat\u summary
最后,在?stat\u summary
中,我们找到了fun.y
参数。@BenRubin“它们也可能是成对geom/stat的参数:fun.y
参数用于stat\u summary
,您会发现它们被记录在那里。
geom_line(mapping = NULL, data = NULL, stat = "identity", position = "identity",
na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...)