I want to plot a time series in different colors, e.g. that the first half is black and the second half of the series is red. I do this with
plot(1:10,col = c(rep("black",5),rep("red",5)),type="o")
However, it only changes the symbols but not the line:
How can I also get a red line for the second half?