How use the option -std=c99 for installing R packages
<p>I have problem in installing plyr R package, and got the following error:</p>

<pre><code>Installing package into '/home/mousavian/R/x86_64-pc-linux-gnu-library/3.2'
(as 'lib' is unspecified)
* installing *source* package 'plyr' ...
** package 'plyr' successfully unpacked and MD5 sums checked
** libs
g++ -I/share/apps/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/home/mousavian/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include"   -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
gcc -I/share/apps/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/home/mousavian/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include"   -fpic  -g -O2  -c loop_apply.c -o loop_apply.o
loop_apply.c: In function 'loop_apply':
loop_apply.c:15:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for(int i = 0; i &lt; n1; i++) {
   ^
loop_apply.c:15:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
make: *** [loop_apply.o] Error 1
ERROR: compilation failed for package 'plyr'
* removing '/home/mousavian/R/x86_64-pc-linux-gnu-library/3.2/plyr'
Warning message:
In install.packages("R packages/plyr_1.8.3.tar.gz", repos = NULL) :
  installation of package 'R packages/plyr_1.8.3.tar.gz' had non-zero exit status
</code></pre>

<p>How can I use -std=c99 option when try to install R packages from the source by install.packages command?</p>

<p>Thanks</p>