Reputation: 149
I have a table in R that I am using to make a barplot:
86 17 482 424 C
87 18 600 426 T
88 11 279 427 Q
89 X 399 436 B
I can make the plot with barplot(table$V3
) but how do I use the values in V4 as the names for each V3 entry?
Upvotes: 1
Views: 365
Reputation: 55350
just use
barplot(DF$V3, names.arg=DF$V4)
where DF
is your data.frame
(a table
is something else in R
. If you actually mean table
, please indicate as such)
Upvotes: 1