[R] Histogram function from lattice package

Peter Ehlers ehlers at ucalgary.ca
Thu Feb 4 14:19:46 CET 2010


  Is this what you want:

singer1 <- subset(singer, voice.part == "Bass 1")
brks <- seq(65, 75, 2)
histogram( ~ height, data = singer1, breaks = brks)

  or, slightly different:

histogram( ~ height, data = singer1, breaks = brks,
   scales = list(x = list(at = brks)))


  -Peter Ehlers

anna wrote:
> Hello everyone, 
> does anyone have an idea of how I display the breakpoints on the x label
> when using the histogram funtion from lattice? 
> 
> -----
> Anna Lippel

-- 
Peter Ehlers
University of Calgary



More information about the R-help mailing list