Consider the following code:
library(ggplot2)
foo <- data.frame(x=1:10,A=1:10,B=10:1)
ggplot(melt(foo,id.vars=\"x\"),aes(x,value,color=variable))+geom_lin
Replotting the red line using a subsetted dataframe does the trick.
library(ggplot2)
foo <- data.frame(x=1:10,A=1:10,B=10:1)
require(reshape2)
fooM <- melt(foo,id.vars="x")
p<-ggplot()
p<-p+geom_line(data=fooM[fooM$variable!="A",],aes(x,value,color=variable),size=5)
p<-p+geom_line(data=fooM[fooM$variable=="A",],aes(x,value,color=variable),size=5)
p
EDIT: Note that ggplot applies layers sequentially on top of each other - this can be best leveraged when constructing the plot line by line.
EDIT2: @tonytonov is right that one may want to avoid plotting identical things twice. Modified my answer to plot everything but A the first time, then only A. Result remains the same and is now also compatible with transparency or big data ;)