[R] [FORGED] Re: Generating a Special Histogram
murdoch.duncan at gmail.com
Fri Jan 6 00:50:03 CET 2017
On 05/01/2017 5:21 PM, Rolf Turner wrote:
> On 06/01/17 10:31, Jim Lemon wrote:
>> Hi Dan,
>> This may help if your data is in the format below:
>> # use a waffle plot
> Being picky-picky-picky I would like to point out that Duncan's and
> David's functions don't *quite* reproduce the picture in the pdf file
> that the OP attached, when called with the data from that picture:
> egdat <- c(137,135,144,149,150,152,159,157,154,163,164,164,
> It's a matter of including the left or right endpoints in the bins.
> Duncan's function needs to swap "<" and "<=" in the definition of "keep"
> (and make a corresponding adjustment in the "|" clause, so as to look at
> the last rather than the first break value).
Well, that's just because the attached picture was wrong :-).
> David's function needs to set "right=FALSE" in the call to cut().
> Jim's waffle plot gets it right, at the expense of needing to have the
> data organised in an inconvenient form.
> All that being said, all of you blokes came up with solutions that are
> far beyond my capability of producing. Hat's off to you.
More information about the R-help