title: Installing R package plyr, stringr and reshape in Linux
body: <p>I keep getting an error when trying to install R packages on Linux: </p>
  
  <pre><code>* installing *source* package âstringrâ ...
  ** package âstringrâ successfully unpacked and MD5 sums checked
  ** R
  ** inst
  ** preparing package for lazy loading
  ** help
  *** installing help indices
    converting help for package âstringrâ
      finding HTML links ... done
      fixed                                   html
      ignore.case                             html
      invert_match                            html
      perl                                    html
      str_c                                   html
      str_count                               html
      str_detect                              html
      str_dup                                 html
      str_extract                             html
      str_extract_all                         html
      str_length                              html
      str_locate                              html
      str_locate_all                          html
      str_match                               html
      str_match_all                           html
      str_pad                                 html
      str_replace                             html
      str_replace_all                         html
      str_split                               html
      str_split_fixed                         html
      str_sub                                 html
      str_sub_replace                         html
      str_trim                                html
      str_wrap                                html
      word                                    html
  ** building package indices
  ** testing if installed package can be loaded
  * DONE (stringr)
  Making 'packages.html' ... done
  
  The downloaded source packages are in
          â/tmp/RtmpXwUJhY/downloaded_packagesâ
  Updating HTML index of packages in '.Library'
  Making 'packages.html' ... done
  Warning message:
  In doTryCatch(return(expr), name, parentenv, handler) :
    unable to load shared object '/usr/lib64/R/modules//R_X11.so':
    libpixman-1.so.0: cannot open shared object file: No such file or directory
  </code></pre>
  
  <hr>
  
  <pre><code>&gt; install.packages("reshape")
  Installing package into â/usr/lib64/R/libraryâ
  (as âlibâ is unspecified)
  </code></pre>
  
  <p>also installing the dependency âplyrâ</p>
  
  <pre><code>trying URL 'http://cran.r-mirror.de/src/contrib/plyr_1.8.tar.gz'
  Content type 'application/x-gzip' length 384462 bytes (375 Kb)
  opened URL
  ==================================================
  downloaded 375 Kb
  
  trying URL 'http://cran.r-mirror.de/src/contrib/reshape_0.8.4.tar.gz'
  Content type 'application/x-gzip' length 38923 bytes (38 Kb)
  opened URL
  ==================================================
  downloaded 38 Kb
  
  * installing *source* package âplyrâ ...
  ** package âplyrâ successfully unpacked and MD5 sums checked
  ** libs
  Warning: R include directory is empty -- perhaps need to install R-devel.rpm or similar
  gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c loop-apply.c -o loop-apply.o
  loop-apply.c:1:15: error: R.h: No such file or directory
  loop-apply.c:2:22: error: Rdefines.h: No such file or directory
  loop-apply.c:4: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âloop_applyâ
  make: *** [loop-apply.o] Error 1
  ERROR: compilation failed for package âplyrâ
  * removing â/usr/lib64/R/library/plyrâ
  ERROR: dependency âplyrâ is not available for package âreshapeâ
  * removing â/usr/lib64/R/library/reshapeâ
  
  The downloaded source packages are in
          â/tmp/RtmpXwUJhY/downloaded_packagesâ
  Updating HTML index of packages in '.Library'
  Making 'packages.html' ... done
  
  Warning messages:
  1: In install.packages("reshape") :
    installation of package âplyrâ had non-zero exit status
  2: In install.packages("reshape") :
    installation of package âreshapeâ had non-zero exit status
  </code></pre>