igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Adding a C function to the igraph R package


From: Gábor Csárdi
Subject: Re: [igraph] Adding a C function to the igraph R package
Date: Thu, 17 Sep 2009 12:19:18 +0200

Hi Mile,

sorry for the late reply, I was offline for a while.

So, to include your function, download the source R package and
uncompress it. Then put your function in a C file into the 'src'
directory. This was the easy part.

A bit harder part is, that you need to write two interface functions
to it, one in R, one in C. The one in C you can put into rinterface.c,
the other one into some R file in the R/ directory. You also need to
put the name of your function into the NAMESPACE file.

To write the interface functions, you can use the already existing
ones as examples and the ultimate documentation is of course 'Writing
R extensions', http://cran.r-project.org/doc/manuals/R-exts.html

Btw. if you think your function might be of interest for a broader
audience and you are willing to share the code, and write some
documentation as well, then you can send it to us and we will put it
into igraph.

Best,
Gabor

On Mon, Sep 14, 2009 at 5:14 PM, Mile Sikic <address@hidden> wrote:
> Hello
>
> I have made my own c function using igraph c libraries. How I can add this
> function to the igraph R package. I am using 0.5.2. version on ubuntu linux.
>
> Regards
>
> Mile SIkic
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]