I have a data set like this
df1
Ch V
A x1
B x1
C x2
D x3
E x2
..
I want to plot with a barplot the number of times V has been shown (on the y axis) while the values of V are shown on the x axis I tried this
df2 <- table(df$V)
df2
V1 Freq
x1 3
x2 4
..
(numbers for Freq are random in this example) and received a table to plot and my code for plotting using ggplot2 is
ggplot(df2, aes(x=V1, y=Freq)) +
geom_bar(stat = 'identity')
It doesn't show me the bars though they are simply not shown. I made sure the values from df are both numerica.
What's the problem? Thank you!

x = Var1but indf2it isV1. Have you try:aes(x = V1 ...)? - dc37df1:ggplot(df1, aes(x=V)) + geom_bar(aes(y = ..count..))orggplot(df1, aes(x=V)) + geom_bar(stat = "count")- Ben