[R] Histogram
Uwe Ligges
ligges at statistik.uni-dortmund.de
Thu Aug 23 11:10:22 CEST 2007
squall44 wrote:
> Well, that was the first thing I tried. But the help only gives you the
> commands and does not explain how to use it (I am a newbe). How do I use the
> argument 'breaks'?
> I tried:
> #---
> x = c(1, 2, 3, 3.5, 4.5, 5, 5.5)
> breaks=c(1, 1, 0.5, 1, 0.5, 0.5)
>
> hist(x,
> breaks= breaks,
> xlim=c(0,7),
> ylim=c(0,5))
> #---
> ...which didn't work.
Well, "breaks" means breaks, not the widths of the bins, hence
hist(youData, breaks = c(1, 2, 3, 3.5, 4.5, 5, 5.5))
is what you want, but that is meaningsless since you have not yet given
any data.
Uwe Ligges
> I tried many other variations, but I am a beginner. If anyone can give me a
> clue, I'd be very thankful.
> Tobias
>
>
>
> Uwe Ligges wrote:
>>
>>
>> squall44 wrote:
>>> Hello,
>>>
>>> I wanted to create a histogram, but somehow I got stuck...
>>>
>>> The interval limits are: x = 1, 2, 3, 3.5, 4.5, 5, 5.5
>>> The interval widths are therefore: 1, 1, 0.5, 1, 0.5, 0.5
>>
>> Please read the help page more carefully! See ?hist and its argument
>> "breaks".
>>
>> Uwe Ligges
>>
>>> Nothing I tried worked... Can anyone help me please?
>>> Thanks
>>> Tobias
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
More information about the R-help
mailing list