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. 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 18 Jun 2002 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"truehist(data[data <= 10]) -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
OK <- mydata <= 10 truehist(mydata[OK]) Kjetil Halvorsen 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. > > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._