I have a list of numbers (used as characters), for instance,
IDs <- as.character(c('0', '01', '002'))
that I would like to add '0's to, to make so that they all have the same number of characters (3). How can I do this?
IDs2 <- c('000', '001', '002')