I am trying to write functions in R where the goal is to read multiple CSV files. They are called 001.csv, 002.csv, ... 332.csv.
With paste I managed to create the names 1.csv, 2.csv, etc., but I had difficulty adding leading zeros. There is a hint that you want to build a construct like sprintf("%03d", 7) , but I have no idea why and how it works.
So can someone explain what the next statement can do?
source share