[R] lattice and histogram

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Sat Jul 28 21:20:02 CEST 2001


On 28-Jul-01 Deepayan Sarkar wrote:
>> 
>> There is no problem if, at given level of "F", "X"
>> is a mixture of good values and "NA"s; it seems to
>> do the right thing by simply ignoring the latter.
>> It's the case of "data = empty set" that seems to
>> cause the trouble.
> 
> 
> This is definitely a bug, which should be fixed in the
> next release of lattice. For now, what I can suggest
> is to change a couple of lines in the histogram()
> function. Replace
> 
> xlim.l <- min(xlim.l, tem$xlim[1])
> xlim.u <- max(xlim.u, tem$xlim[2])
> 
> by
> 
> xlim.l <- min(xlim.l, tem$xlim[1], na.rm = TRUE)
> xlim.u <- max(xlim.u, tem$xlim[2], na.rm = TRUE)

Thanks, I'll give it a try.

> PS: variable names like F might cause problems, since
> a lot of the lattice code use F/T instead of
> FALSE/TRUE. Again, this should not be so, and will be
> fixed in the next release.

That hadn't occurred to me! (I was using A, B, C, ... as
variable names because those are the letters identifying
columns in the spreadsheet I imported the data from).
But you're surely right: the user should not need to
bear in mind a lot of reserved symbols which he should
not use as variable names. Looking forward to the next
release!

Ted.1

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 28-Jul-01                                       Time: 20:20:02
------------------------------ XFMail ------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list