Some key algorithms are written with c/c++ in R. for example, in the package 'tree', the related code is as follows,
fit <- .C(BDRgrow1, as.double(X), as.double(unclass(Y)),
as.double(w), as.integer(c(sapply(xlevels, length),
length(ylevels))), as.integer(rep(1, nobs)), as.integer(nobs),
as.integer(ncol(X)), node = integer(control$nmax), var = integer(control$nmax),
cutleft = character(control$nmax), cutright = character(control$nmax),
n = double(control$nmax), dev = double(control$nmax),
yval = double(control$nmax), yprob = double(max(control$nmax *
length(ylevels), 1)), as.integer(control$minsize),
as.integer(control$mincut), as.double(max(0, control$mindev)),
nnode = as.integer(0L), where = integer(nobs), as.integer(control$nmax),
as.integer(split == "gini"), as.integer(sapply(m, is.ordered)),
NAOK = TRUE)
BDRgrow1 should be the name of a C function. how to read the source code of the function? Any help will be greatly appriciated.