title: function(x) in R: writing a "function" without defining a function?
body: <p>I have come across this concept a couple of times, but don't know the name for it so cannot google it to learn more. Basically, when looking through functions or even simple commands others have written I will often see something similar to this:</p>
  
  <pre><code>apply(dataset, 1:2, function(x) 10 * x)
  </code></pre>
  
  <p>In this case, I was able to figure out that somehow this "fake function" <strong>function(x)</strong> would just multiply each element of the dataset by 10. This seems like a useful feature, but I'm still not certain when or how you use it. Is it really a function? Or does it just work within the apply family of functions? Is there a name for this thing? </p>