title: Column having maximum L2 norm
body: <p>How to find the column of a matrix which has the maximum L2 norm? The matrix has NA values in some columns, we want to ignore those columns.</p>
  
  <p>The following code I am trying, but it shows error due to NA values.</p>
  
  <p>#The matrix is T</p>
  
  <pre><code>for(i in 1:ncol(T)){
  
  if(norm(y,type='2') &lt; norm(T[,i],type = '2'))
  
  y = T[,i]
  }
  </code></pre>
  
  <p>I think it would also be useful if we could somehow get the columns of T as a list, since we could use which.max function then, but I could not do that. Is that possible?</p>
  
  <p>Please help</p>