R中Zipf(频率与排名)图的命令是什么
我从网络流量数据、数据量(字节数)和一周内源 IP 和目标 IP 对的流量数中获得了数据。我想绘制分布图,即频率与排名的关系。 我相信 R 已经为此提供了一个函数。它是什么以及如何在我的场景中使用该功能。
I have from a network traffic data, data volume (# of bytes) and # of flows over a week period for origin and destination IP pair. I want to plot distribution, i.e. frequency against rank.
I believe that there is a function already provided by R for that. What is it and how to use that function for my scenario.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
查看 zipfR 包及其 专用网站,包括以下教程:用于词法统计的 zipfR 包:教程介绍。
Check out the zipfR package, and its dedicated website including the following tutorial: The zipfR package for lexical statistics: A tutorial introduction.
看起来您几乎不需要一个特殊的函数:
或者您正在寻找
hist
?It hardly seems like you need a special function:
Or are you looking for
hist
?这应该是对哈德利答案的评论,但最初的问题正在寻找:
This should properly be a comment to hadley's answer, but the original question is looking for:
有些人使用术语 Zipf 图来表示生存函数的双对数图(累积概率密度的倒数)。我通常这样绘制:
Some people use the term Zipf plot to mean the log-log plot of the survival function (the inverse of the cumulative probability density). I usually plot it this way:
我发现 Zipf 图只是按降序排列的实体(例如“流量”)频率的双对数图。
I found out that Zipf plot is just the log-log plot of the frequency of an entity (say 'flows') sorted in descending order.