title: R data.frame, How to change values matching a criteria just for specific columns?
body: <p>I'd like to change the values in a data.frame that match a criteria, but I'd like to specify the criteria only applies to certain columns. I'm aware about:</p>
  
  <ul>
  <li>Being df = Dataframe: df[df &lt; 0] = 0. This applies to all elements in all the columns, so that, this not resolve my problem</li>
  <li>Being df = Dataframe and Col: a dataframe's column: df$Col[df$Col &lt; 0] = 0.This applies to all elements in 1 column, so that, this not resolve my problem neither.</li>
  </ul>
  
  <p>Which is the solution in the middle that allows me to filter all elements for those specified columns that I define?</p>