title: how to install R packages "RNetCDF" and "ncdf" on Ubuntu?
body: <p>I would like to use the R packages RNetCDF and ncdf in Ubuntu.</p>
  
  <p>When I try <code>install.packages('RNetCDF')</code> or <code>install.packages('ncdf')</code>, I get similar errors:</p>
  
  <pre><code>...
  ncdf.c:3:20: fatal error: netcdf.h: No such file or directory
  compilation terminated.
  make: *** [ncdf.o] Error 1
  ERROR: compilation failed for package ‘ncdf’
  ...
  Warning message:
  In install.packages("ncdf") :
    installation of package ‘ncdf’ had non-zero exit status
  </code></pre>
  
  <p>The packages <code>libnetcdf6</code> and <code>netcdf-bin</code> from the Ubuntu repository are installed. Do I need to do something else? </p>