Try this:
library(ggplot2)
ggplot(DF, aes(SUBJECT, DURATION, fill = ACTION)) +
geom_bar(stat = "identity") +
coord_flip()
Here is the data frame used (to make it reproducible). Next time please use dput
to output the data in the question.
DF <-
structure(list(SUBJECT = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L
), ACTION = structure(c(1L, 2L, 2L, 1L, 3L, 4L, 5L, 4L, 4L, 2L,
3L, 4L, 1L, 1L, 1L, 3L, 4L, 4L, 4L, 1L, 4L, 4L, 2L, 5L, 3L), .Label = c("A",
"B", "C", "D", "E"), class = "factor"), DURATION = c(39.57, 1.48,
53.22, 10.42, 8.33, 1, 7.5, 0.35, 1.35, 2.6, 1.47, 1.13, 4.23,
1.62, 7.58, 133.47, 14.82, 0.45, 1.07, 61.62, 42.45, 4.47, 100.92,
9.05, 9.55)), .Names = c("SUBJECT", "ACTION", "DURATION"),
class = "data.frame", row.names = c(NA,
-25L))