[Rd] hist title paste problem (PR#7421)
b.rowlingson at lancaster.ac.uk
b.rowlingson at lancaster.ac.uk
Tue Dec 14 16:35:28 CET 2004
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.
More information about the R-devel
mailing list