Re: [R] accesing slots of S4 class in C code

From: Seth Falcon <>
Date: Thu 18 Aug 2005 - 23:50:38 EST

Hi Aniko,

On 17 Aug 2005, wrote:

> I am trying to use a custom S4 object in my C code and I cannot get
> the access to its slots working.
> The following is a toy example, but even this crashes.
> res <- .C("TestFun", pd.obj)

I'm pretty sure you want to use the .Call interface for this sort of thing, not .C.

Other than referring you to the Writing R Extensions manual, you might want to look at the Ruuid package in Bioconductor which is quite simple, but demonstrates accessing S4 classes from C.

See to grab a source package of Ruuid.


+ seth

PS: Questions of this nature (C code type stuff) are better suited to the R-devel mail list. mailing list PLEASE do read the posting guide! Received on Fri Aug 19 00:02:50 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:29:21 EST