title: How do I define and run a function over a dataframe?
body: <p>I have the following function that I was able to copy into a piece of code but it wasn't running directly over a dataframe. I need to run it now simply on a dataframe with a slight change, but can't figure out the proper syntax for doing this.</p>
  
  <p>The function is simply: <code>function(x) ifelse(x&gt;0, paste0("+", x), x)</code></p>
  
  <p>And the change is that I want to run it on every column except for the first column. So after the first column, this function should iterate over all the cells in the dataframe and prepend a <code>+</code> sign to any positive value.</p>
  
  <p>And I'd like to run the modified function over dataframe <code>df</code>. Is there a way to do this inline?</p>
  
  <p>Sample data to play with:</p>
  
  <pre><code>structure(list(data_2018 = c(3.2, 3, 3.2), data_2017 = c(2.825, 
  0, -0.425), pilot = c(0.51578947368421, -0.0526315789473699, 
  0.41052631578947), all = c(0.42222222222222, -0.18518518518519, 
  0.27407407407407), general = c(0.40833333333333, -0.0833333333333299, 
  0.36666666666667)), class = "data.frame", row.names = c(NA, -3L
  ))
  </code></pre>