title: Apply to list of vectors
body: <p>I have list of numerical vectors (with different sizes each) in R. Let's say the list has 10 elements.</p>
  
  <p>I would like to apply a function (something like <code>max(x - K, 0)</code> where <code>K</code> is a fixed constant) to each elements of each vector of the list, and get an output with exactly the same structure (thus a list of vectors).</p>
  
  <p>I tried <code>sapply(data, function(x) max(x-K, 0))</code> but I get a vector of size 10. I don't know exactly what are its components by the way. I also tried <code>max(data-K,0)</code> directly, but I get an error message.</p>
  
  <p>Can anyone help me ? </p>