[R] Raw histogram plots

2008-03-01 Thread Antony Unwin
Why not use the interactive histogram in iplots? ihist(x) Then you can vary the binwidth interactively and get a very quick idea of the structure of your data by looking at a range of plots with different binwidths. Relying on a single plot to reveal everything about a variable's

Re: [R] Raw histogram plots

2008-02-27 Thread Henrique Dallazuanna
If I understand: x - rnorm(1e6) out - tapply(x, ceiling(x), length) plot(as.numeric(names(out)), out) On 27/02/2008, Andre Nathan [EMAIL PROTECTED] wrote: On Wed, 2008-02-27 at 14:15 +1300, Peter Alspach wrote: If I understand you correctly, you could try a barplot() on the result of

Re: [R] Raw histogram plots

2008-02-27 Thread Andre Nathan
On Wed, 2008-02-27 at 14:15 +1300, Peter Alspach wrote: If I understand you correctly, you could try a barplot() on the result of table(). Hmm, table() does the counting exactly the way I want, i.e., just counting individual values. Is there a way to extract the counts vs. the values from a

Re: [R] Raw histogram plots

2008-02-27 Thread Charilaos Skiadas
On Feb 27, 2008, at 8:16 AM, Andre Nathan wrote: On Wed, 2008-02-27 at 14:15 +1300, Peter Alspach wrote: If I understand you correctly, you could try a barplot() on the result of table(). Hmm, table() does the counting exactly the way I want, i.e., just counting individual values. Is

Re: [R] Raw histogram plots

2008-02-27 Thread Frank E Harrell Jr
Andre Nathan wrote: On Wed, 2008-02-27 at 14:15 +1300, Peter Alspach wrote: If I understand you correctly, you could try a barplot() on the result of table(). Hmm, table() does the counting exactly the way I want, i.e., just counting individual values. Is there a way to extract the counts

Re: [R] Raw histogram plots

2008-02-27 Thread Andre Nathan
On Wed, 2008-02-27 at 08:48 -0500, Charilaos Skiadas wrote: x - table(rbinom(20,2,0.5)) plot(names(x),x) should do it. You can also try just plot(x). Use prop.table on table if you want the relative frequencies instead. Yes, names is what I needed :) Thanks for the prop.table hint. I

[R] Raw histogram plots

2008-02-26 Thread Andre Nathan
Hello I need to plot a histogram, but insted of using bars, I'd like to plot the data points. I've been doing it like this so far: h - hist(x, plot = F) plot(y = x$counts / sum(x$counts), x = x$breaks[2:length(x$breaks)], type = p, log = xy) Sometimes I want to have a look at

Re: [R] Raw histogram plots

2008-02-26 Thread roger koenker
take a look at ?stem There is still a place for handtools in the age of integrated circuits. Of course, avoiding binning isn't really desirable. url:www.econ.uiuc.edu/~rogerRoger Koenker email[EMAIL PROTECTED]Department of Economics vox: 217-333-4558

Re: [R] Raw histogram plots

2008-02-26 Thread hadley wickham
On Tue, Feb 26, 2008 at 4:10 PM, Andre Nathan [EMAIL PROTECTED] wrote: Hello I need to plot a histogram, but insted of using bars, I'd like to plot the data points. I've been doing it like this so far: h - hist(x, plot = F) plot(y = x$counts / sum(x$counts), x =

Re: [R] Raw histogram plots

2008-02-26 Thread Andre Nathan
I know about stem, but the data set has 1 million points, so it's not very useful here. I want to avoid binning just to have an idea about the shape of the distribution, before deciding how I'll bin it. Andre On Tue, 2008-02-26 at 16:20 -0600, roger koenker wrote: take a look at ?stem

Re: [R] Raw histogram plots

2008-02-26 Thread Peter Alspach
-help Subject: Re: [R] Raw histogram plots I know about stem, but the data set has 1 million points, so it's not very useful here. I want to avoid binning just to have an idea about the shape of the distribution, before deciding how I'll bin it. Andre On Tue, 2008-02-26 at 16:20 -0600

Re: [R] Raw histogram plots

2008-02-26 Thread Marc Schwartz
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andre Nathan Sent: Wednesday, 27 February 2008 1:34 p.m. To: roger koenker Cc: r-help Subject: Re: [R] Raw histogram plots I know about stem, but the data set has 1 million points, so it's not very useful

Re: [R] Raw histogram plots

2008-02-26 Thread Prof Brian Ripley
On Tue, 26 Feb 2008, Andre Nathan wrote: I know about stem, but the data set has 1 million points, so it's not very useful here. I want to avoid binning just to have an idea about the shape of the distribution, before deciding how I'll bin it. Ideas: 1) use a much smaller sample of the data