title: How to get the package name of a function in R?
body: <p>I'm debugging some code and I think I might have twice the same function in 2 packages.</p>
  
  <p>I want to output the package name of the function as it would be executed by the R console.</p>
  
  <p>Examples :</p>
  
  <ul>
  <li><code>function_package_name(print)</code> # --> base</li>
  <li><code>function_package_name(select)</code> # --> dplyr</li>
  </ul>
  
  <p>I cannot simply use <code>?select</code> because I think it links to the choice of 2 packages: <code>dplyr</code> and <code>MASS</code>.</p>
  
  <p><strong>How can I know which <code>select</code> function I'm using ?</strong></p>
  
  <p>NB : this is NOT a duplicate of <a href="https://stackoverflow.com/questions/11379807/list-all-functions-on-cran">list all functions on CRAN</a>, nor of <a href="https://stackoverflow.com/questions/16818186/find-the-package-names-from-a-function-name-in-r">Find the package names from a function name in R</a>, so <code>sos::findFn()</code> is not an acceptable answer ! I'm not looking for potential other functions named like this one, I'm looking for the package name of the one I'm currently using !</p>