Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
I am sorry for my careless. I forgot implementing the last code corresponding to setting y-axis. Thanks Mark Leeds and all guys. 2013/1/22 hp wan > Thanks. This time the x-axis works well but the y-axis is missing. > > 2013/1/22 Mark Leeds > >> Hi Hp: I decided to use axis because names.arg

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
Thanks. This time the x-axis works well but the y-axis is missing. 2013/1/22 Mark Leeds > Hi Hp: I decided to use axis because names.arg wasn't working very well. > Below is > an improvement and I'm sure, given enough effort, it can be improved much > more. But > atleast below will get you start

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Mark Leeds
Hi Hp: I decided to use axis because names.arg wasn't working very well. Below is an improvement and I'm sure, given enough effort, it can be improved much more. But atleast below will get you started. breaks=c(-1.55,-1.50,-1.45,-1.40,-1.35,-1.30,-1.25,-1.20,-1.15,-1.10,-1.05,-1.00,-0.95,-0.90,-0.

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Mark Leeds
Hi: if you mean that you want the labels to be the strings "-1.55", "-1.50" etc then you can use the names.arg argument for that. You can create a vector of character strings binstrings = c("-1.55","-1.50", ) or just convert your data to strings using as.character. Then, in the call to barpl

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
But the x-axis of barplot is still not what I want. The xlab is breaks, not -1.55,-1.50,,0.55. 2013/1/22 Mark Leeds > Hi Hp: I'm not sure what you want. Below looks slightly better but if you > want the x-axis > to have better labels, then there is a names.arg argument to barplot. see > ?bar

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Mark Leeds
Hi Hp: I'm not sure what you want. Below looks slightly better but if you want the x-axis to have better labels, then there is a names.arg argument to barplot. see ?barplot. I don't know what each of the bins represents but if you want to include all of those zeros then I don't think there's any w

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
Ok, that is no problem. 2013/1/22 Mark Leeds > let me look at but it's probably best to send to the whole list because > there are many > people on it way more knowledgable than myself. I'm ccing the list and > hope you > don't mind. my fault for replying privately initially. > > > > On Mon, Jan

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Mark Leeds
let me look at but it's probably best to send to the whole list because there are many people on it way more knowledgable than myself. I'm ccing the list and hope you don't mind. my fault for replying privately initially. On Mon, Jan 21, 2013 at 7:36 PM, hp wan wrote: > Thanks for your reply! >

Re: [R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread Duncan Murdoch
On 13-01-21 5:18 PM, hp wan wrote: Hi All, When carrying out hist(samples,breaks=50,probability=TRUE), the column values are considerably greater than 1, which seams very unreasonable. The plot is attached. I think the column value of the hist plot should correspond to x$counts/sum(x$counts)

[R] Why using hist when setting the parameter probability=TRUE does not create probability plot?

2013-01-21 Thread hp wan
Hi All, When carrying out hist(samples,breaks=50,probability=TRUE), the column values are considerably greater than 1, which seams very unreasonable. The plot is attached. I think the column value of the hist plot should correspond to x$counts/sum(x$counts) (x=hist(samples,breaks=50,probabilit