On Sep 23, 2013, at 05:43 , Jim Lemon wrote:
> 
> barplot(tabulate(x,nbins=85)[35:85])
> barplot(tabulate(y,nbins=85)[35:85])
> 
> This is an underhanded trick to line up the bars as I think you want them.

Not all that underhanded! table() with numeric vectors _will_ skip values not 
present in data, which is usually not desirable if the magnitude of the values 
matters. It gets a bit awkward if there are nonpositive (or very large) values, 
though. A better solution could be table(factor(x, levels=35:85)).

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
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.

Reply via email to