I have a dataframe and I want to plot it with ggplot:
ggplot(newlevels, aes(dates)) +
geom_line(newlevels$levels, aes(y=levels), colour="red") +
geom_line(newlevels$mean, aes(y=newlevels$mean), colour="green") +
geom_line(newlevels$levelSMA,aes(y=newlevels$levelSMA), colour="blue")
But, I want to plot only [1:100] lines of the dataframe, can I do it directly with ggplot without creating a new dataframe which is dataframe[1:100]? I cannot find the syntax to plot a part of data from dataframe. Thanks.