Fiona_Wang
Fiona_Wang

Reputation: 163

R how to get the function definition when call inside other function

result <- .Call("mcga", popsize, chsize, crossprob, mutateprob, 
    elitism, minval, maxval, maxiter, par, best, evalFunc, 
    population, costs, envv, PACKAGE = "mcga")

how to get the mcga function definition in R, mcga is a R package for genetic algorithm.

Upvotes: 1

Views: 95

Answers (2)

J_F
J_F

Reputation: 10372

You can get the definition of the function at the GitHub page of the package: https://github.com/cran/mcga/blob/master/src/mcga.c

Regards,
J_F

Upvotes: 1

Eric Lecoutre
Eric Lecoutre

Reputation: 1481

.Callis used to call compiled code (dll or equivalent). The only way is to retrieve the source package (the .tar.gz), uncompress and have a look at the source code -- Cf https://cran.r-project.org/web/packages/mcga/index.html; uncompress and have a look at "src" folder (seems to be C code in that case)

Upvotes: 2

Related Questions