Skip to content
Prev 21402 / 63424 Next

Converting SEXP to primitive C types

On Tue, 11 Jul 2006, Michael Petrovich wrote:

            
See `Writing R Extensions', the documentation for that file.  You cannot 
just guess that an object has the appropriate SEXPTYPE: you have to check 
it (or coerce to it).  In your example it is likely to be a REALSXP (it 
could be an INTSXP), so you need to cover all possible cases.