Skip to content
Prev 360872 / 398506 Next

What is the easiest way to turn a dataframe into a barplot?

Here is one way:

dd <- data.frame(var1=c("string1", "string2", "string3"), var2=c(3,7,4))
dd
with(dd, barplot(var2, names.arg=var1))

--Chris Ryan
Binghamton, NY
yoursurrogategod at gmail.com wrote: