title: Place on specific positions of dataframes specific values
body: <pre><code>    DF &lt;- data.frame(x1=c(NA,7,7,8,NA), x2=c(1,4,NA,NA,4)) # a data frame with NA
      WhereAreMissingValues &lt;- which(is.na(DF), arr.ind=TRUE) # find the position of the missing values
      Modes &lt;- apply(DF, 2, function(x) {which(tabulate(x) == max(tabulate(x)))}) # find the modes of each column
  DF
  WhereAreMissingValues
  Modes
  </code></pre>
  
  <p>I would like to replace the NAs of each column of DF with the mode, accordingly.
  Please for some help.</p>