[Solved] Syntax error in ggplot Function in R


I think it would be less confusing to revert to a for loop. Try:

plotTimeSeries <- list(temp1,temp2,temp3,temp4)
for (i in plotTimeSeries) {
   i$dt <- strptime(i$dt, "%Y-%m-%d %H:%M:%S")
   ggplot(i, aes(dt, ambtemp)) + geom_line() +
     scale_x_datetime(breaks = date_breaks("2 hour"),
                      labels=date_format("%H:%M")) + 
       labs(x="Time 00.00 ~ 24:00 (2007-09-29)",y="Ambient Temperature",
           title = (paste("Node",i)))
}

7

solved Syntax error in ggplot Function in R