[R] New problem

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Apr 10 17:28:49 CEST 2003

On Thu, 10 Apr 2003, Ramzi Feghali wrote:

> in fact i know that R deals with logical numbers 0 and 1 the same way
> like TRUE and FALSE but my problem is in fact with C language.

Could you please use a meaningful subject line.

> I have done an interface with C and my first problem was with float
> variables, but this warning doesn't appear everytime and really i don't
> know the problem with R:
> "Warning message: 
> DLL attempted to change FPU control word from 8001f to 9001f"

That's not a problem with R, that is R complaining (correctly) about your
compiled code.  See e.g. the CHANGES file.  I am surmising that you are
using Windows (without saying so) and not using the recommended compiler
(without saying so).  If you follow the recommendations you will not see 

> The second problem is how to define my matrix in the function call of R
> so that C take it as an input, knowing that for C this matrix is dfine
> as: "int M[dimrow][dimcol]" and for R is define as.matrix(m),

An R array is not a C matrix: it is a vector with attributes.  There are
examples in the `Writing R Extensions' manual, `S Programming' and in many 
of the 207 packages on CRAN.

> it really hurts interfacing with R

There is an easy way, via reading the manuals, and a hard way, via
trial-and-error.  Your choice, but you will not get sympathy for the 

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list