ggplot中的特殊变量文档(..count ..,..density ..等) [英] Documentation for special variables in ggplot (..count.., ..density.., etc.)

查看:312
本文介绍了ggplot中的特殊变量文档(..count ..,..density ..等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ggplot2中的stats_函数创建特殊变量,例如 stat_bin2d 创建一个名为 .. count .. 的特殊变量。我在哪里可以找到文档列出哪些stat_函数返回哪些特殊变量?



我已经看过主要的ggplot2 文档页面和R在线帮助。我尝试阅读stat_bin2d的源代码,但它使用了我不懂的语言 - 我不知道如何获得 StatBin2d $ new(...)

解决方案

大部分内容都记录在帮助页面的值部分,例如<$
$ b


值:



?stat_boxplot

 带有附加列的数据框:

width: boxplot的宽度

  ymin:lower whisker =最小观察值大于或等于
lower hinge - 1.5 * IQR

下:下铰链,25%分位数

notchlower:缺口下边缘=中位数-1.58 * IQR / sqrt(n)

中间值:中值,50%分位数

notchupper:缺口上缘=中值+ 1.58 * IQR / sqrt(n)

上部:上部铰链,75%分位数

  ymax:上胡须=最大观察小于或等于
上铰链+ 1.5 * IQR


我建议为那些没有记录的人提交错误报告。对于 stat_bin2d 错误报告 >,但它是固定封闭的。如果你创建了一个新的错误报告,你可以参考那个。


The stats_ functions in ggplot2 create special variables, e.g. stat_bin2d creates a special variable called ..count... Where can I find documentation listing which special variables are returned by which stat_ function?

I've looked on the main ggplot2 documentation pages, and in R online help. I tried reading the source code for stat_bin2d, but it uses bits of the language I don't understand -- I don't know how to get at the code behind StatBin2d$new(...).

解决方案

Most of them are documented in the value section of the help pages, e.g., ?stat_boxplot says

Value:

 A data frame with additional columns:

width: width of boxplot

ymin: lower whisker = smallest observation greater than or equal to
      lower hinge - 1.5 * IQR

lower: lower hinge, 25% quantile

notchlower: lower edge of notch = median - 1.58 * IQR / sqrt(n)

middle: median, 50% quantile

notchupper: upper edge of notch = median + 1.58 * IQR / sqrt(n)

upper: upper hinge, 75% quantile

ymax: upper whisker = largest observation less than or equal to
      upper hinge + 1.5 * IQR

I suggest submitting bug reports for those that remain undocumented. There is a bug report for stat_bin2d, but it was closed as fixed. If you create a new bug report you can refer to that one.

这篇关于ggplot中的特殊变量文档(..count ..,..density ..等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆