[R] printf() in C

Roger Peng rpeng at stat.ucla.edu
Sat Feb 22 08:20:04 CET 2003

Try including the line


and using the function Rprintf().  This prints output to the R console.

UCLA Department of Statistics
rpeng at stat.ucla.edu

On Fri, 21 Feb 2003, Maria N Kocherginsky wrote:

> Hi,
> 1. I'm making an R package in Windows 2000, and I'm including the .c files. 
> Everything works fine, except that when I call the printf() function in the C 
> code, it doesn't actually print anything. I'm including the following header 
> files:
> #include <stdio.h>
> #include <math.h>
> #include <sys/types.h>
> #include <stdlib.h>
> and I have the recommended MinGW compiler.
> Any suggestions?
> 2.  I get a warning about having CRLF line endings in the C code, but I saved 
> the .c files as ASCII in Notepad. Is this really a problem? How can I get rid 
> of these?
> Thank you,
> Masha
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help

More information about the R-help mailing list