我至少有5个表,如下所示(table1和table2)。我想为每个位置(Pos)列绘制A,T,G,C列的直方图。我想在一个情节中绘制两个表格。我怎么能在R中这样做?
table1<- structure(list(Pos = 1:19, A = c(48L, 12L, 9L, 8L, 26L, 34L,
18L, 3L, 3L, 10L, 8L, 7L, 12L, 4L, 9L, 7L, 9L, 7L, 243L), C = c(13L,
2L, 2L, 6L, 2L, 2L, 11L, 6L, 2L, 2L, 10L, 6L, 10L, 4L, 1L, 6L,
9L, 1L, 84L), G = c(12L, 4L, 1L, 5L, 6L, 1L, 4L, 7L, 8L, 7L,
7L, 1L, 8L, 5L, 3L, 6L, 3L, 2L, 45L), T = c(32L, 7L, 3L, 8L,
4L, 3L, 5L, 4L, 5L, 12L, 16L, 1L, 9L, 3L, 2L, 9L, 1L, 14L, 226L
)), .Names = c("Pos", "A", "C", "G", "T"), class = "data.frame", row.names = c(NA,
-19L))
table2<- structure(list(Pos = 1:19, A = c(48L, 12L, 9L, 8L, 26L, 34L,
18L, 3L, 3L, 10L, 8L, 7L, 12L, 4L, 9L, 7L, 9L, 7L, 243L), C = c(13L,
2L, 2L, 6L, 2L, 2L, 11L, 6L, 2L, 2L, 10L, 6L, 10L, 4L, 1L, 6L,
9L, 1L, 84L), G = c(12L, 4L, 1L, 5L, 6L, 1L, 4L, 7L, 8L, 7L,
7L, 1L, 8L, 5L, 3L, 6L, 3L, 2L, 45L), T = c(32L, 7L, 3L, 8L,
4L, 3L, 5L, 4L, 5L, 12L, 16L, 1L, 9L, 3L, 2L, 9L, 1L, 14L, 226L
)), .Names = c("Pos", "A", "C", "G", "T"), class = "data.frame", row.names = c(NA,
-19L))
答案 0 :(得分:2)