title: Apply function returning NULL
body: <p>I am trying to find skewness of my numeric columns in a data frame. The apply function used in the below code is returning <code>NULL</code>. However, when I use the function directly to any of the column it returns values.</p>
  
  <pre><code>library(mlbench)
  data(Glass)
  funNum= function(x){
    if(is.numeric(x)){return(skewness(x))
    }
  }
  
  funNum(Glass$Na)
  # [1] 0.4478343
  
  apply(Glass,2,funNum)
  # NULL
  </code></pre>
  
  <p>Please suggest what is wrong in the above code. Thanks in advance!</p>