Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 在哪里可以找到“geom_line”中“fun”参数的文档?_R_Ggplot2 - Fatal编程技术网

R 在哪里可以找到“geom_line”中“fun”参数的文档?

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

我正在学习关于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, 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, ...)