On Mon, Jun 11, 2012 at 1:10 PM, maxbre mbres...@arpa.veneto.it wrote:
sorry but I can't close this thread with a viable solution other than the
following one
(i.e. by defining an user function to add line);
I understand that the problem is related to the fact that:
mean(log(.)) !=
Thanks a lot, Deepayan!
What a great honour hearing from you inside this thread!
Now, at last, I understand where MY problem was
(but please, don’t laugh – too loudly at least – and, first of all, sorry
for that!)
this was my “poor” wrong attempt (but I did not post this)
means-mean(exp(x))
sorry but I can't close this thread with a viable solution other than the
following one
(i.e. by defining an user function to add line);
I understand that the problem is related to the fact that:
mean(log(.)) != log(mean(.)) is
but for some reason I can't put all that in practice inside the
thanks david,
yes, you are right PART of the confusion is because of what you mentioned
(sorry for that) but going back to my own data this is JUST PART of the
problem…
...see my reproducible example
teq-structure(list(site = structure(c(4L, 2L, 2L, 4L, 2L, 4L, 4L,
3L, 1L, 3L, 1L, 1L, 3L, 4L,
On Jun 8, 2012, at 3:52 AM, maxbre wrote:
thanks david,
yes, you are right PART of the confusion is because of what you
mentioned
(sorry for that) but going back to my own data this is JUST PART of
the
problem…
...see my reproducible example
teq-structure(list(site = structure(c(4L, 2L,
thanks ilai
sorry, I mixed up a little: I was thinking to medians of each panel but
instead I was trying to plot medians for each variety (what an awful chart,
indeed!)
thanks for your solution (medians for each panel), it works perfectly, as
usual...
cheers
max
--
View this message in
...and what if I need to plot another vertical line for showing also the
means for each panel?
by simply adding another call to panel.abline () seems not producing a
correct result for each panel
# medians and means for each panel:
dotplot(variety ~ yield | site, data = barley,
Hi!
I recently posted a similar question (entitled Adding mean line to a
lattice density plot). Have not got any usable solution forcing my to
fall back to the use of the normal 'plot' function. The problem was the
same as yours: using panel.abline simply did not work, the position of
the
thanks kimmo
I managed to get the desired result by first plotting the medians and then
adding the means through the user defind function posted in thread you
mentioned (here it is
http://r.789695.n4.nabble.com/Adding-mean-line-to-a-lattice-density-plot-td4455770.html#a4456502)
# start
On Jun 7, 2012, at 10:23 AM, maxbre wrote:
thanks kimmo
I managed to get the desired result by first plotting the medians
and then
adding the means through the user defind function posted in thread you
mentioned (here it is
a new session of R with the following sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Italian_Italy.1252 LC_CTYPE=Italian_Italy.1252
[3] LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C
[5] LC_TIME=Italian_Italy.1252
On Jun 7, 2012, at 11:34 AM, maxbre wrote:
a new session of R with the following sessionInfo()
Part of the confusion may be that you have reversed the colors for
mean and median in two different examples. The other confusion may be
that mean(log(.)) != log(mean(.))
this is the code
by considering this example from barley dataset
#code start
dotplot(variety ~ yield | site, data = barley,
scales=list(x=list(log=TRUE)),
layout = c(1,6),
panel = function(...) {
panel.dotplot(...)
#median.values - tapply(x, y, median)# medians
You say median for each panel but tapply gets medians for each variety
(chartjunk IMHO). Regardless, *this case* has nothing to do with
panel.abline. Add print(median.values) to your panel function would have
hinted as to the missing piece.
# medians for each panel:
dotplot(variety ~ yield |
14 matches
Mail list logo