I have three columns with date, var1 and var2. I like to create bar chart date being the x axis and var1 and var2 is y axis. I can do this in line chart but I really like to see
How about this, with ggplot2
# load libraries
library(ggplot2)
library(reshape2)
# load data
df1 <- read.table(header=TRUE, text=
"Date var1 var2
2011-12-06 37608.1 12304.2
2011-12-07 76430.9 28617.7
2011-12-08 93112.3 33414.6
2011-12-09 100334.8 28112.0
2011-12-10 70474.0 23641.4
2011-12-11 231113.6 78172.5")
# reshape for plotting
df1.m <-melt(df1)
# make a quick plot
qplot(x = factor(Date), y = value, data = df1.m, geom = "bar", fill = variable)
And the resulting plot...