I need to run a code on many data sets (like df.p2
, df.p3
) to get charts. Following is the data format that I have.
< df.p1
Date Sales
Jan 2011 1000
Feb 2011 1120
Mar 2011 1050
.
.
.
Like this I have a list of data frames, now I want to run the following code in a loop.
ggplot(df.p1, aes(Date,Sales))+
geom_line()+
xlab("Month") + ylab("Sales") +
ggtitle("Sales-Product1")