I am looking for the source code of a function (getRecursions from the package 'recurse') to see how it works. Here, are the steps I did:
getRecursions
function (x, radius, threshold = 0, timeunits = c("hours",
"secs", "mins", "days"), verbose = TRUE)
{
UseMethod("getRecursions", x)
}
<bytecode: 0x00000246a5983b30>
<environment: namespace:recurse>
methods(getRecursions)
[1] getRecursions.data.frame* getRecursions.Move*
[3] getRecursions.MoveStack*
see '?methods' for accessing help and source code
getAnywhere('getRecursions.data.frame')
A single object matching ‘getRecursions.data.frame’ was found
It was found in the following places
registered S3 method for getRecursions from namespace recurse
namespace:recurse
with value
function (x, radius, threshold = 0, timeunits = c("hours",
"secs", "mins", "days"), verbose = TRUE)
{
stopifnot(is.data.frame(x))
stopifnot(ncol(x) == 4)
stopifnot(radius > 0)
timeunits = match.arg(timeunits)
results = getRecursionsCpp(x[, 1], x[, 2], x[, 3], x[, 4],
x[, 1], x[, 2], radius, threshold, timeunits, verbose)
results$timeunits = timeunits
class(results) = "recurse"
if (verbose) {
class(results) = c("recurse", "recurse.verbose")
dataTz = attr(x[, 3], "tzone")
if (!is.null(dataTz)) {
attr(results$revisitStats$entranceTime, "tzone") = dataTz
attr(results$revisitStats$exitTime, "tzone") = dataTz
}
}
return(results)
}
<bytecode: 0x00000247245c34c8>
<environment: namespace:recurse>
So, now I need to find the source code for the function 'getRecursionsCpp' as following:
getAnywhere('getRecursionsCpp')
A single object matching ‘getRecursionsCpp’ was found
It was found in the following places
namespace:recurse
with value
function (trajX, trajY, trajT, trajId, locX, locY, radius, threshold,
timeunits, verbose)
{
.Call("_recurse_getRecursionsCpp", PACKAGE = "recurse",
trajX, trajY, trajT, trajId, locX, locY, radius, threshold,
timeunits, verbose)
}
<bytecode: 0x0000024745a6ea20>
<environment: namespace:recurse>
How can I find the source code for the function call .Call("_recurse_getRecursionsCpp")?
I tried to use this recurse:::"_recurse_getRecursionsCpp"
, but it doesn't work.