I\'m having with trouble with ggplot trying to plot 2 incomplete time series on the same graph where the y data does not have the same values on the x-axis (year) - NAs are
You can remove them by subsetting your dataframe:
ggplot(test, aes(x=YEAR)) +
geom_line(data=subset(test, !is.na(A1)),aes(y = A1), size=0.43, colour="red") +
geom_line(data=subset(test, !is.na(A2)),aes(y = A2), size=0.43, colour="green") +
xlab("Year") + ylab("Percent") +
scale_x_continuous(limits=c(1935, 1995), breaks = seq(1935, 1995, 5),
expand = c(0, 0)) +
scale_y_continuous(limits=c(0,50), breaks=seq(0, 50, 10), expand = c(0, 0))