title: Test condition in all the columns of a data frame
body: <p>I have a data frame and I check if the all the columns of the data frame contain numeric values.</p>
  
  <pre><code>   V1         V2         V3
  1  114        9.078186  1.6310523
  2  116        8.228931  1.6405415
  3  117        8.043536  1.6625413
  4  118        6.179346  0.8489116
  </code></pre>
  
  <p>I use</p>
  
  <pre><code>sapply(df,is.numeric) 
  </code></pre>
  
  <p>this returns</p>
  
  <pre><code>    V1            V2            V3
     TRUE            TRUE          TRUE
  </code></pre>
  
  <p>Now how do I check if all the columns are numeric? I'm looking for something like:</p>
  
  <pre><code>if(sapply(df,is.numeric)==TRUE)
  print(" All are Numeric")
  </code></pre>
  
  <p>But it check only one condition , as the length of vector is more than one so it through a warning</p>
  
  <pre><code>Warning message:
  In if (sapply(df, is.numeric) == TRUE):
    the condition has length &gt; 1 and only the first element will be used
  </code></pre>