i have a data frame and i want to generate a geom_tile()
plot from it , but I want the graph to be ordered not based on the alphabetic but based on a variable inside this data frame.
structure(list(V1 = c("a", "y", "w", "p", "v", "h", "i"),
V2 = c("r", "w", "q", "m", "l", "q", "g"), V3 = c(
"5", "2", "9", "2", "1", "3", "0")), .Names = c("V1", "V2",
"V3"), class = "data.frame", row.names = c(NA, -8L))
I want to order the plot based in the variable V3
, because the normal plotting will order them based on the alphabetic in V1
and V2
.
How this can be done ??
See Question&Answers more detail:os