How to get bar type plots for two points in a plot in R?

r
datavisualization
plot

#1

Hi,

I have two points on a plot in R. I want to compare them with bars like a bar plot for the two points. How can I plot bars or how can I get histogram/barplot for two specific values?

thanks


#2

Can you please be clearer about the question?

If the values are known, the following code seems to give the required results:

A <- c(1,2)
barplot(A)