Verbose output from R CMD check
Both the following lines return 0 hits grep printf *.c|grep -v Rprintf|grep -v fprintf grep puts *.c Is there some way to detect what has caused this warning about puts? It's not a call to 'puts' or 'printf' because there are none.
Longshot: grep '[^Rf]printf' *.c
Peter's longshot hit the bull's eye, this was the offending line
foobar.c: if (*smoothOrStochastic==0) Rprintf("0\n"); else (printf("1\n"));
So I clearly need to brush up a little on regular expressions. The
mistake is the scripting was that I used this
find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\printf\Rprintf\'{} \;
find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\fRprintf\fprintf\' {} \;
and not this
find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\printf\Rprintf\g'{} \;
find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\fRprintf\fprintf\g' {} \;
Many thanks Simon, Peter and Martin for your suggestions, R CMD check
now runs clean :-)
David
David Pleydell, INRA, UMR-1351 CMAEE, Domaine Duclos, Prise D'eau, 97122 Petit Bourg, Guadeloupe dpleydell at antilles.inra.fr pleydell at cirad.fr Tel +33 5 90 25 54 42 Fax +33 5 90 94 03 96