Hi, There may be an easier way but here is one way you can do it.
# create vector that has Y[i] X[i]s new.data <- rep(X,Y) hist(new.data, breaks=c(0,.1,.4,.6)) # or something like that look at what exactly breaks should be. Ritwik. On 9/27/06, Mohsen Jafarikia <[EMAIL PROTECTED]> wrote: > Dear all, > > I want to design a histogram and I need to have the frequency at certain > points. For example I have the following 2 columns: > > *X Y* > > 0.1 25 > 0.4 22 > 0.45 11 > 0.55 21 > > I want the chart to have 4 columns. First column is from 0.0-0.1 (on X) and > frequency is 25. Next colum is wider and form 0.1-0.4 with 22 frequency. > Next column is narrow with 11 frequency and the last column is the same as > the first one with 21 frequency. > > Can anybody tell me how I can have this chart. > > Thanks, > Mohsen > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Ritwik Sinha Graduate Student Epidemiology and Biostatistics Case Western Reserve University [EMAIL PROTECTED] | +12163682366 | http://darwin.cwru.edu/~rsinha ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
