From faheem at email.unc.edu  Mon Jan 31 16:51:31 2005
From: faheem at email.unc.edu (Faheem Mitha)
Date: Mon Jan 31 16:51:34 2005
Subject: [Rd] type of list elements in .Call
In-Reply-To: <Pine.LNX.4.61.0501311510350.27856@gannet.stats>
References: <Pine.LNX.4.61.0501310953100.10677@Chrestomanci>
	<Pine.LNX.4.61.0501311510350.27856@gannet.stats>
Message-ID: <Pine.LNX.4.61.0501311042060.10677@Chrestomanci>



On Mon, 31 Jan 2005, Prof Brian Ripley wrote:

> This is covered, copiously, in the examples in `Writing R Extensions'. 
> Hint: search for coerceVector.

I see. I thought that INTEGER and its relatives did coercion too, but now 
I see that is not stated anywhere.

Eg. REAL is first used in "Writing R Extensions" in 4.7.1 as in

REAL(ab)[0] = 123.45
...

and I cannot find a discussion about what it does previous to that, or 
indeed afterwards.

In Rinternals header file, it says

/* Under the generational allocator the data for vector nodes comes
    immediately after the node structure, so the data address is a
    known ofset from the node SEXP. */

This does not mean much to me. Perhaps a short comment in the 
documentation would be helpful, if not already present.

                                                                   Faheem.


[Rd] type of list elements in .Call
Faheem Mitha