title: R data.table column wildcard with sprintf
body: <p>Given a <code>data.table</code> with an arbitrary number of columns</p>
  
  <pre><code>dt = data.table( a = letters[1:5], b = rep('-', 5), c = LETTERS[1:5] )
  #    a b c
  # 1: a - A
  # 2: b - B
  # 3: c - C
  # 4: d - D
  # 5: e - E
  </code></pre>
  
  <p>and an arbitrary <code>format</code> string having a number of placeholders corresponding to the number of columns</p>
  
  <pre><code>format = '%s0%s1%s'
  </code></pre>
  
  <p>How to apply <code>sprintf</code> without explicitly calling it with all column names?
  Just provide the <code>data.table</code> won't work because <code>sprintf</code> expects 3 arguments in this case. Calling <code>sprintf(format, dt$a, dt$b, dt$b)</code> is no option because I don't know neither the <code>format</code> nor the <code>data.table</code> beforehand.
  Also <code>sapply</code> on row indices won't work because the operation has to be done on a subset of rows preserving their order.</p>
  
  <pre><code>idx = seq( 1, by = 2, to = 5 )
  </code></pre>
  
  <p>So the goal is by issueing a hypothetical command</p>
  
  <pre><code>dt[ idx, sprintf( format, * )]
  </code></pre>
  
  <p>achieving this</p>
  
  <pre><code># [1] "a0-1A" "c0-1C" "e0-1E"
  </code></pre>
  
  <p>It can be done by calling</p>
  
  <pre><code>cols = paste( names( dt ) ), collapse=',' )
  # "a,b,c"
  eval( parse( text = sprintf( 'dt[ idx, sprintf( format,%s )]', cols ) ) )
  # [1] "a0-1A" "c0-1C" "e0-1E"
  </code></pre>
  
  <p>But this is rather arcane and definetly not clean code and it would be nice if there was a more semantic way in the <code>data.table</code> package itself.
  So the question is basically if there is one. Until now neither google nor the the <code>data.table</code> manual gave me an answer.
  Furthermore I do neither want to <code>paste</code> some/multiple columns but I want to use all columns instead nor I am looking for a way to achieve this by the use of <code>data.frame</code>. I am looking for smooth <code>data.table</code> syntax.</p>