title: How can I load dependencies in an R package?
body: <p>I am developing an R package where this is available in the <code>DESCRIPTIONS</code> file</p>
  
  <pre><code>Imports: 
      dplyr,
      ggplot2,
      ncdf4
  </code></pre>
  
  <p>And I have an example function where I use the third dependency</p>
  
  <pre><code>testFun &lt;- function(file, lat, long){
    ncfname &lt;- file.path(file,fsep = .Platform$file.sep)
    xfile &lt;- nc_open(ncfname) #Opens the NetCDF file
    lat &lt;- ncvar_get(xfile, 'lat') #Extracts all latitudes
  
    ...Calculations
  
    return(XYZ)
  }
  </code></pre>
  
  <p>When I <code>Build and Reload</code> the package, and I run the function, it <code>could not find function "nc_open"</code>. </p>
  
  <p>BUT, it works when I replace it with <code>ncdf4::nc_open</code></p>
  
  <p>Am I supposed to prefix <code>packagename::</code> to every dependency I use in the code? or am I missing something?</p>
  
  <p>Ordinarily, I would like all the dependencies to be installed from the <code>DESCRIPTIONS</code> and it's functions available for use without requiring the package prefix everytime.</p>