From b.rowlingson at lancaster.ac.uk  Tue Dec 14 16:35:28 2004
From: b.rowlingson at lancaster.ac.uk (b.rowlingson@lancaster.ac.uk)
Date: Tue Dec 14 16:35:34 2004
Subject: [Rd] hist title paste problem (PR#7421)
Message-ID: <20041214153528.C6C4C106A5@slim.kubism.ku.dk>

Full_Name: Barry Rowlingson
Version: 2.0.0
OS: RH FC2 Linux
Submission from: (NULL) (194.80.32.8)


If the title string to a histogram is of length > 1, the words 'Histogram of'
get pasted to each element. Looks wrong.

Example:

 hist(apply(matrix(0,10,10),1,function(x){runif(1)}))

Produces a title that goes:

  Histogram of apply(matrix(0,10,10),1,function(x){
          Histogram of runif(1)
             Histogram of })

Its in the way that 'Histogram of' is pasted to the deparsed expression. If that
expression has an anonymous function in it, then that gets deparsed into a
vector of length 3, and hence 'Histogram of' gets put on the start of each one.


There's probably several trivial ways to fix this, so I wont choose one, but
leave it to the experts.


[Rd] hist title paste problem (PR#7421)
b.rowlingson@lancaster.ac.uk