How to get source code for this R function

Viewed 61

I'm fairly new to R, so apologies if this is a basic question! I'm trying to find the source code for the bluster package build_snn_rank. I tried

bluster:::build_snn_rank

which returned:

function (neighbors) 
{
    .Call("_bluster_build_snn_rank", PACKAGE = "bluster", neighbors)
}
<bytecode: 0x7fc0e311c080>
<environment: namespace:bluster>

Usually for Primitive or similar functions, I'm able to find the code on GitHub or after a Google search, but bluster is a pretty new package. I'm not sure if this one is also calling a C++ function like many others I've worked with. I tried checking exported objects from Rcpp, RcppAnnoy, etc. but couldn't find it.

I'm using R4.1 on MacOS for this one. I have Ubuntu on Parallels VM with R3.6 too, but bluster isn't available for 3.6.

In general, I have not had success finding the source codes for function like this without searching directly online. I can't find a "names.C" file anywhere on either system, either. Searching the HD for names of these functions doesn't yield anything typically. Is there an easier way to find these functions or are they just hidden? Thanks!

1 Answers

Assuming this is the library in question, here is every mention build_snn_rank on github.

Edit: from my understanding, the function definition is in build_snn.cpp

Related