On May 14, 2010, at 9:55 AM, Research wrote:
Hello,
Is there a function that returns the number of the "bin" (or
quantile, or percentile etc. etc.) that a value of a variable may
belong to?
Tor example:
breaks<-hist(variable, 18, plot=FALSE)
If the following breaks are
5 10 15 20 25 3
On Fri, May 14, 2010 at 10:55 AM, Research wrote:
> Is there a function that returns the number of the "bin" (or quantile, or
> percentile etc. etc.) that a value of a variable may belong to?
Something like this should work:
dat <- round(runif(20, 0, 100))
hist.dat <- hist(dat, plot = FALSE)
ge
> x<- rnorm(200)
> hist(x, 18)
> str(hist(x, 18))
List of 7
$ breaks : num [1:15] -3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 ...
$ counts : int [1:14] 3 1 8 12 34 35 40 30 18 11 ...
$ intensities: num [1:14] 0.03 0.01 0.08 0.12 0.34 ...
$ density: num [1:14] 0.03 0.01 0.08 0.12 0.34 ...
Hello,
Is there a function that returns the number of the "bin" (or quantile,
or percentile etc. etc.) that a value of a variable may belong to?
Tor example:
breaks<-hist(variable, 18, plot=FALSE)
If the following breaks are
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
the boundaries
4 matches
Mail list logo