From lgautier at gmail.com  Wed Jul 16 05:18:01 2014
From: lgautier at gmail.com (Laurent Gautier)
Date: Tue, 15 Jul 2014 23:18:01 -0400
Subject: [Rd] C-API: removing key-value pairs in an environment
In-Reply-To: <CABtg=KkJdTBh9P=70Z-5RgmfwWYeYCPEuZHviDEGJcbkph_4fA@mail.gmail.com>
References: <53C5E26C.2080907@gmail.com>
	<CABtg=KkJdTBh9P=70Z-5RgmfwWYeYCPEuZHviDEGJcbkph_4fA@mail.gmail.com>
Message-ID: <53C5EEE9.2040702@gmail.com>

Thanks.
I was hoping that there was an alternative since last time I looked (I 
was calling R's "rm()" - I am seeing with the example that I can narrow 
it down to the .Internal "remove").

L.


On 07/15/2014 10:43 PM, G?bor Cs?rdi wrote:
> It seems that this is not part of the C API, and you need to call back
> to R. Here is how Rcpp does it:
>
> https://github.com/RcppCore/Rcpp/blob/e2fcecad4533301d12e1ba19e94ab9f0fa3eb423/inst/include/Rcpp/Environment.h#L194
>
> Best,
> Gabor
>
> On Tue, Jul 15, 2014 at 10:24 PM, Laurent Gautier <lgautier at gmail.com> wrote:
>> Hi,
>>
>> I am trying to remove key-value pairs from an environments (using C).
>>
>> While adding seems straightforward with `Rf_defineVar()`, I cannot find a
>> function to remove objects from a given environment.
>>
>> Would anyone know if there is such a function ?
>>
>> Best,
>>
>>
>>
>> Laurent
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] C-API: removing key-value pairs in an environment
Laurent Gautier