由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - [R] R plot histogram question about breaks
相关主题
请教一个r的问题Is STATA better than SAS and R in plotting?
求助 R density plot 出现波纹。。。How to make image.plot in sas
How can I improve my R plot to publishing quality?output multiple files in a do loop
请教一个用R画图的问题请问怎么做个plot,各数据点可以标注不同颜色
How to selectively plot data in RR:matrix
请问诸位高手:lattice比一般的画图plot之类R: cut
R kmeans issue, plot result[转载] Re: SAS plot problem
what's wrong with Proc Reg???一个sas问题
相关话题的讨论汇总
话题: breaks话题: histogram话题: bin话题: just话题: plot
进入Statistics版参与讨论
1 (共1页)
j***3
发帖数: 142
1
When plotting histogram in R, how exactly R is using breaks? can someone
help me if I understand correctly?
e.g.
breaks=c(0,1,2,3)
default is right= TURE, means the following three bins:
(0,1],(1,2],(2,3]
or
???
so if the entries is 0, they will not be counted?
if I want to include the 0 class in the first bin, I use right= FALSE, but
then the 3 is not included?
is there some way I can set a bin as just one point, e.g. 0 ?
thanks!
z**k
发帖数: 378
2
the range of breaks has to cover all x. As for your case, I guess R just use
[0,1] (1,2], (2,3] ...
D******n
发帖数: 2836
3
use cut or breaks=c(-0.1,2,3)

【在 j***3 的大作中提到】
: When plotting histogram in R, how exactly R is using breaks? can someone
: help me if I understand correctly?
: e.g.
: breaks=c(0,1,2,3)
: default is right= TURE, means the following three bins:
: (0,1],(1,2],(2,3]
: or
: ???
: so if the entries is 0, they will not be counted?
: if I want to include the 0 class in the first bin, I use right= FALSE, but

j***3
发帖数: 142
4
thanks zerk,
thank you DaShagen, I think using -0.0x is a solution here, I just wondering
if you can define a bin as just one point rather than a range.
j***3
发帖数: 142
5
thanks zerk,
thank you DaShagen, I think using -0.0x is a solution here, I just wondering
if you can define a bin as just one point rather than a range.
1 (共1页)
进入Statistics版参与讨论
相关主题
一个sas问题How to selectively plot data in R
R plot: 用pdf(append=T) 将多个图输出到一个PDF文件请问诸位高手:lattice比一般的画图plot之类
split-plot菜问题R kmeans issue, plot result
请问R中有没有MATLAB里面类似hold on的语句what's wrong with Proc Reg???
请教一个r的问题Is STATA better than SAS and R in plotting?
求助 R density plot 出现波纹。。。How to make image.plot in sas
How can I improve my R plot to publishing quality?output multiple files in a do loop
请教一个用R画图的问题请问怎么做个plot,各数据点可以标注不同颜色
相关话题的讨论汇总
话题: breaks话题: histogram话题: bin话题: just话题: plot