On 20 Jun 2014, at 04:30 , David Winsemius <dwinsem...@comcast.net> wrote:

> I think it's your `digits = 0` argument:
> 
>> formatC(20, digits = 3, width = 3, flag = "0")
> [1] "020"

At any rate, sprintf() is often more convenient:

> sprintf("%03d.csv", c(30, 104, 223))
[1] "030.csv" "104.csv" "223.csv"


-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to