Re: [R] Is ther a possibility to display the log(frequency) instead of the frequency in the hist plot?

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [R] Is ther a possibility to display the log(frequency) instead of the frequency in the hist plot?
From: Alexander A. Morgan (amorgan@linus.mitre.org)
Date: Fri 19 Jan 2001 - 05:05:04 EST


Message-ID: <Pine.GSO.4.21.0101181400100.4236-100000@carla.mitre.org>

I imagine that the point of logging the histogram count axis is just for
displaying purposes, and your suggestion would alter the scale. I find it
easier to just leave the 0 counts as zero.

hist(my.data, plot=F)$counts -> my.hist.counts;
my.hist.counts[my.hist.counts != 0] <-
                      log(my.hist.counts[my.hist.counts!= 0]);
plot(my.hist.counts, type="hist");

-Alex Morgan

Phone: 781-271-6306 "They laughed at Newton.
Office: 3K-136 They laughed at Einstein.
AOL Instant Messenger: HomeySage But they also laughed at Groucho
                                          Marx."
                                                      --Carl Sagan

On Thu, 18 Jan 2001, Peter Kleiweg wrote:

> Witold Eryk Wolski skriver...
>
> > Some questions still remain to me.
> > 1. How take an log if one of the my.hist$counts equals 0?
>
> log(my.hist$counts + 1)
>
> --
> Peter Kleiweg
> http://www.let.rug.nl/~kleiweg/
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Thu 01 Feb 2001 - 16:14:42 EST