From csardi.gabor at gmail.com  Tue Nov 26 18:05:20 2013
From: csardi.gabor at gmail.com (=?ISO-8859-1?B?R+Fib3IgQ3PhcmRp?=)
Date: Tue, 26 Nov 2013 12:05:20 -0500
Subject: [Rd] dynamic lists at C level
In-Reply-To: <CAJ=0CtC=OMdefDWh67amdupD5q0xWWnU_4qfTXmGJKUQECiyMg@mail.gmail.com>
References: <CAJ=0CtCn-GKHZ6VhNxuVbHF0oSpVrSYN_7Yy6swOHi4x1-25Hw@mail.gmail.com>
	<21140.53153.880034.556888@max.nulle.part>
	<CAJ=0CtC=OMdefDWh67amdupD5q0xWWnU_4qfTXmGJKUQECiyMg@mail.gmail.com>
Message-ID: <CABtg=K=+cCEa32S=FoxyU_Ayfx_Z3M6aNgb0aLi=vnGeAOfp-Q@mail.gmail.com>

On Tue, Nov 26, 2013 at 11:57 AM, Adrian Du?a <dusa.adrian at gmail.com> wrote:
[...]
> I read the "Writing R Extensions" manual, I could only find how to
> handle with R lists in C (section 5.9.6 Handling lists), but I could
> not find how to <create> a list in C, and access its components, and
> this is basically where I got stuck.

Create a new list with NEW_LIST(), set elements with SET_VECTOR_ELT(),
query elements with VECTOR_ELT().

Search 'Writing R Extensions', and the R source code itself, and/or
the source code of packages (authored by people you can trust, not my
packages, please :), for the details.

Gabor

[...]



[Rd] dynamic lists at C level
=?ISO-8859-1?B?R+Fib3IgQ3PhcmRp?=