On Fri, Jun 22, 2012 at 5:50 PM, maxbre mbres...@arpa.veneto.it wrote:
Given my reproducible example
myexample-structure(list(site = structure(c(4L, 2L, 2L, 4L, 2L, 4L, 4L,
3L, 1L, 3L, 1L, 1L, 3L, 4L, 5L, 2L), .Label = c(A, B, C,
D, E), class = factor), obs = c(0.302, 0.956, 0.72, 1.21,
thanks a lot deepayan,
I will study carefully your code!
thanks
max
--
View this message in context:
http://r.789695.n4.nabble.com/Reordering-levels-of-a-factor-within-a-lattice-dotplot-tp4634201p4634277.html
Sent from the R help mailing list archive at Nabble.com.
Given my reproducible example
myexample-structure(list(site = structure(c(4L, 2L, 2L, 4L, 2L, 4L, 4L,
3L, 1L, 3L, 1L, 1L, 3L, 4L, 5L, 2L), .Label = c(A, B, C,
D, E), class = factor), obs = c(0.302, 0.956, 0.72, 1.21,
0.887, 0.728, 1.294, 20.493, 0.902, 0.031, 0.468, 2.318, 4.795,
89.581,
Hello,
Try the following
myex - myexample
myex$sample - as.character(myex$sample)
myex$sample - as.Date(myex$sample, format=%d/%m/%Y)
myex
Then, run the first attempt without bothering to order, lattice is
clever and will do it for you.
Hope this helps,
Rui Barradas
Em 22-06-2012 13:20,
thanks for your reply but I don't think your solution can accomplish to what
I need...
(I can't see any ordering of the variable sample with reference to the
variable obs)
please keep in mind that for a numer of reasons that I do not mention here
for the sake of conciseness in my case the
Hello,
Ok, I hadn't understood. I still don't, not completely. Why do you want
to order 'sample' with reference to 'obs'? It would make sense only in
the case of 'obs' ties. Doesn't it make more sense to order 'sample'
within 'site'?
As for keeping 'sample' character it's very simple, I was
Sorry, missed the plot instruction.
dotplot(sample[ord] ~ obs[ord] | site, data=myex,
[... etc ...]
Rui Barradas
Em 22-06-2012 16:43, Rui Barradas escreveu:
Hello,
Ok, I hadn't understood. I still don't, not completely. Why do you
want to order 'sample' with reference to
7 matches
Mail list logo