Hi Rayan,
This error comes due to the mapping of elements in aes() while plotting barplot.
geom_bar by default takes a count of values as y in a bar plot. So use stat="identity" within barplot() to avoid the default and use fields as used in mapping function.
ggplot(data,aes(field1,field2)) +geom_plot(stat="identity")