Is ther a possibility to display the log(frequency) instead of the frequency in the hist plot?
Uwe Ligges wrote:
Witold Eryk Wolski wrote:
Is there a possibility to display the log(frequency) instead of the frequency in the hist?
I think you want something like the following example: x <- runif(100) * 10 my.hist <- hist(x) my.hist # have a look at the values! my.hist$counts <- log(my.hist$counts, 10) # logarithm with base 10 plot(my.hist) # now plot it again with log(frequency) Uwe Ligges
Hi Uwe! First thanks for your answer. Some questions still remain to me. 1. How take an log if one of the my.hist$counts equals 0? 2. You code expample produces an error message which i doesnt understand.
plot(my.hist) # now plot it again with log(frequency)
Error in plot.window(xlim, ylim, log, asp, ...) :
invalid xlim
3. I tried as workaround something similar.
plot(my.hist$mids,log(my.hist$counts),type="s") And this would work quite good for
my needs.
But problem with log(0) = -Inf still remains.
I think I have to formulate my question more general. Why, and this is an question
which I am asking myself since
I am started using R becouse im using the hist plot quite often, the hist plot in
the base package has no similar
options like eg. the histogram plot in XMGR?
THX
Eryk
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-- Witold Eryk Wolski Max Plank Institut fuer Molekulare Genetik Ihnestr73 14195 Berlin Germany tel.: Work 0049-30-84131426 http://www.molgen.mpg.de/~wolski -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._