Yao, Minghua wrote:

Hi,
Anyone can tell me how to generate "A01", "A02", ..., "A99"?
paste("A", 1:99, sep="") generates "A1", "A2",..., "A99". This is not what I want.
Thanks for the help.
-MY


        [[alternative HTML version deleted]]


How about?

sapply(1:99, function(i) sprintf("A%02d", i))

--sundar

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to