It isn't entirely clear what you want to do. But most likely you will need to use ?expression and ?substitute to get this done. This should get you started:
plot(1:4)
value<-c(10,20)
index<-c("a","b")
lab <- rep(expression(paste("n"[index], "=", value, sep="")),2)
for (i in 1:length(lab)) {
lab[i] <- eval(substitute(substitute(expr, list(value=value[i], index=index[i])), list(expr= as.call(lab[i]))))
}
axis(3,at=c(2,3),labels=lab)