On Tue, Mar 29, 2011 at 11:05:08AM +0200, Karin Lagesen wrote: > Hi! > > I have a dataset that looks like this: > > 0.0 14 > 0.0 3 > 0.9 12 > ...and so on. > > I would like to plot this in a histogram-like manner.
One way would be to re-create the original data and then simply use hist: dat <- data.frame(x=c(0,0,0.9,0.73,0.78,1,0.3,0.32), freq=c(14,3,12,15,2,15,2,8)) hist(with(dat, rep(x, times=freq))) My example did not take special binning wishes into account but you can easily customiye that with the breaks argument to hist. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Maximus-von-Imhof-Forum 3 85354 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ ______________________________________________ R-help@r-project.org 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.