juiie@@i@croix m@iii@g oii stude@t@uiiege@be
2019-Mar-14 14:44 UTC
[R] Unobtainable source code of specific functions
Dear all, I currently work on a translation of a cost surface function from R to Python for my dissertation at university. In this context, I have to understand the "AccCost" method (https://rdrr.io/cran/gdistance/src/R/accCost.R). This method calls the function "shortest.paths" among other functions. This is precisely the function that computes the cost surface so I found the source code with "getAnywhere(shortest.paths())", but my problem is that this code calls other functions that cannot be accessed with getAnywhere or on the web... These functions are "C_R_igraph_finalizer", "C_R_igraph_get_graph_id" and "C_R_igraph_shortest_paths". My question is therefore the following, how or where could I find these source code ? (Note : I have the package Igraph installed) Thanks a lot for the help, Julien Lacroix
On Thu, 14 Mar 2019 15:44:07 +0100 (CET) julien.lacroix at student.uliege.be wrote:> My question is therefore the following, how or where could I find > these source code ? (Note : I have the package Igraph installed)Functions wrapped in .Call() are implemented in a compiled language, with corresponding sources in the src/ directory of a package. For example, the call to C_R_igraph_shortest_paths seems to end up in https://github.com/igraph/igraph/blob/6faf5610b8ab0175466e93a8a1d1981987976a38/src/structural_properties.c#L460 -- Best regards, Ivan