R语言格式化输出,数字前补足0:
> a<-c(1,2,4,11,123) > a [1] 1 2 4 11 123 > b<-formatC(a,width=3,flag='0') > b [1] "001" "002" "004" "011" "123" >