On Mar 21, 2012, at 1:07 PM, Justin Montemarano wrote:
Hi all:
I've got it... it appears that total.density was also defined in two
separate data frames (se.predict.data and dc.predict.data) with levels
order 16, 32, 8. Using relevel(), I moved 8 to the first position
and it's
solved the pl
Hi all:
I've got it... it appears that total.density was also defined in two
separate data frames (se.predict.data and dc.predict.data) with levels
order 16, 32, 8. Using relevel(), I moved 8 to the first position and it's
solved the plotting problem.
Ista's 'minimal' reproducible code request pr
You'll also want to use dput() to send us an exact encoding of your
data when making that reproducible example: there might be something
subtle at play here that print methods won't show.
Michael
On Wed, Mar 21, 2012 at 12:28 PM, Ista Zahn wrote:
> On Wed, Mar 21, 2012 at 12:00 PM, Justin Montem
On Wed, Mar 21, 2012 at 12:00 PM, Justin Montemarano wrote:
> Ista:
>
> Your attached code did work for me; moreover, the facets were presented in
> the desired order with facet_wrap() and facet_grid(), which is what I'm
> using because I have a second factor used in facet_grid().
>
> Still, my pl
Ista:
Your attached code did work for me; moreover, the facets were presented in
the desired order with facet_wrap() and facet_grid(), which is what I'm
using because I have a second factor used in facet_grid().
Still, my plots with total.density as a facet are coming out in 16, 32, 8,
and I'm no
Hi Justin,
this gives the correct order (8, 16, 32) on my machine:
total.density <-
c(8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32)
total.density <- f
I think I understand, but I believe my original interest is in the order of
levels(total.density), since ggplot appears to be using that to order the
facets. Thus, I'm still getting three graphs, ordered (and displayed as)
16 to 32 to 8, rather than the more intuitive, 8 to 16 to 32. I'm sorry if
Ah, you're missing something crucial:
> levels(total.density)
[1] "8" "16" "32"
is giving you the *labels* of the factor, as *strings*, and what you
get if you use order() on them has nothing to do with the order of the
factor levels, and everything to do with the string sort order for
your loca
Actually I've try that too, Sarah
The test is to run order(levels(total.density)), which I need to be 1 2 3,
not 2 3 1, and your solution still gives me 2 3 1.
I also don't know how to reply to this thread with the previous message
below...
-
Justin Montemarano
Graduate Student
Kent State Uni
Is this what you need?
> total.density <-
+
c(8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32)
> total.density <- factor(total.density, levels=c(8, 16, 3
10 matches
Mail list logo