From ripley at stats.ox.ac.uk  Mon Aug 12 18:25:47 2013
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 12 Aug 2013 17:25:47 +0100
Subject: [Rd] Creating data.frame from c-language
In-Reply-To: <9D80368C6A00834189C1982FB64EFA3007ED8721@ORD2MBX07C.mex05.mlsrvr.com>
References: <9D80368C6A00834189C1982FB64EFA3007ED8670@ORD2MBX07C.mex05.mlsrvr.com>
	<52063D7E.7000009@stats.ox.ac.uk>
	<9D80368C6A00834189C1982FB64EFA3007ED8721@ORD2MBX07C.mex05.mlsrvr.com>
Message-ID: <52090C8B.2030603@stats.ox.ac.uk>

On 12/08/2013 17:24, Boris Aronshtam wrote:
> Dear Professor Brian D. Ripley,
>
> Thank you for your reply. Yes, the speed is essential and data is large (gigabytes). I would like to learn from stats/src/model.c. Where can I find it?

In the R sources ....

> Thanks,
> Boris
>
> -----Original Message-----
> From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
> Sent: Saturday, August 10, 2013 6:18 AM
> To: Boris Aronshtam
> Cc: r-devel at r-project.org
> Subject: Re: [Rd] Creating data.frame from c-language
>
> On 09/08/2013 22:48, Boris Aronshtam wrote:
>> I need to create a data.frame from C-language and populate it. I Know how to create lists from C, but I cannot figure out how to create a data.frame. Does anyone have a sample code for creating a data.frame, setting column names, and populating it with data?
>
> Use data.frame() via an eval() call from C.
>
> Or see the code is stats/src/model.c, as part of model.frame.default (but I would only do that if speed were essential).
>


-- 
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



[Rd] Creating data.frame from c-language
Prof Brian Ripley