Thanks!
Yes, but I also want to be able to condition easily hence
histogram(...), not plot
-Original Message-
From: Don MacQueen [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2008 3:55 PM
To: Rogard, Erwann R&D/US/EXT; r-help@r-project.org
Subject: Re: [R] histogram for int
You might consider something based on the concept of:
y <- table( x)
plot( as.numeric(names(y)) , y, type='h')
-Don
At 2:59 PM -0400 3/27/08, <[EMAIL PROTECTED]> wrote:
>hi,
>
>library(lattice)
>x<-c(-1,-1,-1,0,0,0,0,1,1,2)
>rng<-range(x)
>histogram(x,endpoints=c(rng[1]-0.5,rng[2]+0.5),nin
hi,
library(lattice)
x<-c(-1,-1,-1,0,0,0,0,1,1,2)
rng<-range(x)
histogram(x,endpoints=c(rng[1]-0.5,rng[2]+0.5),nint=length(unique(x)))
instead of contiguous bins, i'd like spaces between them to indicate
that the data is discrete, or even better, line segments positioned at
integer values.
i kn
3 matches
Mail list logo