Hinzufügen von Werten zu barplot der Tabelle in R

Ich versuche zu zeichnen eine Tabelle mit barplot und hinzufügen von Werten zu.

tt = structure(c(7L, 13L, 24L, 30L, 30L, 38L, 35L, 45L, 37L, 
43L, 38L, 59L, 33L, 45L, 37L, 58L), .Dim = c(2L, 8L), .Dimnames = structure(list(param = c("A", 
"B"), xvar = c("5", "6", "7", "8", "9", "10", "11", "12")), .Names = c("param", "xvar")), class = "table")
tt
     xvar
param  5  6  7  8  9 10 11 12
    A  7 24 30 35 37 38 33 37
    B 13 30 38 45 43 59 45 58

bb= barplot(tt)
text(bb, 0, tt)

Hinzufügen von Werten zu barplot der Tabelle in R

Und:

bb= barplot(tt)
text(bb, tt, tt)

Hinzufügen von Werten zu barplot der Tabelle in R

Beide nicht setzen-Werte richtig. Ich habe auch versucht t(tt) im text (), aber es funktioniert nicht richtig. Wie kann das getan werden. Vielen Dank für Ihre Hilfe.

InformationsquelleAutor rnso | 2014-12-14

Schreibe einen Kommentar