Wednesday, November 6, 2013

C style formatting in R

Numbering/naming files in a controllable format is important when making animations of a series of plots (by using animate for example). When the plots are being generated in R, there is an easy way to control the names of the output files as shown below;







The advantage here is that when you feed in files with the same base.name and numbered 000..100 (instead of 0..100), the command convert automatically reads them in increasing order w/o you relying on time stamps and such. 

1 comment: