[R] Problem with histogram

Petr Pikal petr.pikal at precheza.cz
Tue Jun 18 16:56:31 CEST 2002



On 18 Jun 2002 at 9:25, VBMorozov at lbl.gov wrote:

> Hi Everyone
> I have 1dim array of data, which spans, say from 0 to 60. I would like
> to histogram that data only in the range of 0 to 10. How do I do that?
> Something like truehist(data,breaks=c(0:10)) returns an error message
> " breaks do not cover tha data"
> 
> Please help.

Not completely sure what do you intend but what about

truehist(yourdata[yourdata<10])

or in case you want rescaling something like

truehist(yourdata*10/max(yourdata))

may help

> 
> Thank you,
> Vlad.
> 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-.-.- r-help mailing list -- Read
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help",
> or "[un]subscribe" (in the "body", not the subject !)  To:
> r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._._._._

Petr Pikal
petr.pikal at precheza.cz
p.pik at volny.cz


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list