creating ggplot stack bar and trend line
===

I am working with data frame like this:

  df

        Date    variable   Value
        1/1/2012 teamA     10
        1/1/2012 teamA     10
    
        
        1/1/2012 teamB    10
        
        1/1/2012 teamC     15
        
        1/2/2012 teamA    25
        
        1/2/2012 teamB     30
        
        1/2/2012 teamC     20
    
    And second data frame called total
    
  

         Date      Total
        1/1/2012 50
        1/2/2012 70

I am trying to create a ggplot stack var and draw a trend line for the total on the same graph like this:

    ggplot(df,aes(x=Date, y=Value, fill=(variable))) +  geom_bar(stat="identity") + theme_bw() + opts(title = "Team Performance") + xlab("Date") + ylab("Score") + geom_smooth(data=Total,aes(Date,Total,group=1), method="lm", size=2, color="darkblue")

I get this error:  

    Error in eval(expr, envir, enclos) : object 'variable' not found

When I do this by itself:
 `"ggplot(df,aes(x=Date, y=Value, fill=(variable))) +  geom_bar(stat="identity") + theme_bw()",` 
it works

variable object is definetely tehre, any ideas, what I am doing wrong here?

    





