ab <- 1:4
plot(ab, main = paste("value",ab))
The above produces
Whereas I want the label to show exactly like value 1:4. I know I can do this by tweaking the paste function something like paste0("value ",ab[1],":", ab[4]). But there must be a simpler way and also sometimes ab is just a single number, so I want something consistent that works for both cases. I also tried with expression and bquote, but can't figure out a way. Thanks.


