I have seen that the hist() function plots an histogram of the frequency but I cannot find the value of the object hist that contains theese values... how is possible to get out them? thank you very mutch best regards Manuele -- Manuele Pesenti manuele a inventati.org amicogodzilla a jabber.linux.it http://mpesenti.polito.it
Try xx = hist(yy,plot=FALSE) ## plot=FALSE if you don't want to plot it and then xx$counts HIH Stefano On Wed, Jul 18, 2007 at 12:34:42PM +0200, Manuele Pesenti wrote: <Manuele>I have seen that the hist() function plots an histogram of the frequency but I <Manuele>cannot find the value of the object hist that contains theese values... how <Manuele>is possible to get out them? <Manuele> <Manuele>thank you very mutch <Manuele>best regards <Manuele> <Manuele> Manuele <Manuele> <Manuele> <Manuele>-- <Manuele>Manuele Pesenti <Manuele> manuele a inventati.org <Manuele> amicogodzilla a jabber.linux.it <Manuele> http://mpesenti.polito.it <Manuele> <Manuele>______________________________________________ <Manuele>R-help a stat.math.ethz.ch mailing list <Manuele>https://stat.ethz.ch/mailman/listinfo/r-help <Manuele>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html <Manuele>and provide commented, minimal, self-contained, reproducible code.
Quoting Manuele Pesenti <amicogodzilla at bruttocarattere.org>:> I have seen that the hist() function plots an histogram of the > frequency but I > cannot find the value of the object hist that contains theese values... how > is possible to get out them? > > thank you very mutch > best regards > > Manueleif you add 'plot=FALSE', like this: hist(rnorm(100),plot=FALSE) instead of plotting the histogram, you get a list of values. The component $counts contains what you're looking for. You can give it a name: a<-hist(rnorm(100),plot=FALSE), and treat it like any other list. (if you do "a<-hist(rnorm(100))" then you get both the values and the plot) check ?hist for details. Jose -- Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6513374 Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360 Swann Building, Mayfield Road University of Edinburgh Edinburgh EH9 3JR UK