In R, a barplot is computed using the barplot function. Here is the most basic example you can do. The input data is a **numeric vector**, which gives the height of the bars. It can be a column of a dataframe. Please consult this page and this one to learn how to custom a barplot.

1 2 3 4 5 6 7 8 |
# Let's create a vector of data: my_vector=c(3,12,5,18,45) names(my_vector)=c("A","B","C","D","E") # The most basic barplot you can do: barplot(my_vector) |

Not what you are looking for ? Make a new search !

## Leave a Reply

Be the First to Comment!