title: Identify row with maximal value in each column of the dataframe in r
body: <p>I have a table like this:</p>
  
  <pre><code>d=structure(list(sample = c("A", "B", "C", "D", "E"), Obs1 = c(10L, 
  0L, 11L, 2L, 3L), Obs2 = c(0L, 0L, 2L, 1L, 10L), Obs3 = c(1L, 
  1L, 1L, 1L, 10L), Obs4 = c(0L, 11L, 3L, 3L, 3L), Obs5 = c(7L, 
  7L, 3L, 3L, 3L)), class = "data.frame", row.names = c(NA, -5L
  ))
  </code></pre>
  
  <p>For each column i'd like to find row with maximal value in this column to get in result a table like (for my example):</p>
  
  <p><a href="https://i.stack.imgur.com/IxXfI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IxXfI.png" alt="enter image description here"></a></p>
  
  <p>How can i achieve that in <code>R</code> (preferably in <code>Base library</code>).</p>