On Dec 9, 2011, at 7:27 AM, Duncan Murdoch wrote:

On 11-12-08 1:30 PM, Weizeng Ni wrote:
hi, I am using the package of "Fslector" which contains a function named "information.gain". I want to see the detailed code of this function. the
result shows

information.gainfunction (formula, data)
{
    information.gain.body(formula, data, type = "infogain")
}


When I then try to see the code of  information.gain.body, it shows
Error: could not find function "information.gain.body".

Why cannot I get access to the codes?

You probably need to use Fslector:::information.gain.body, or (even better) look at the source for the package, which you should be able to get using

download.packages("Fslector", type="source", destdir=<your directory>)




I'm not educated enough to know off the top of my head whether

Fslector:::information.gain.body

... is exactly equivalent to:

getAnywhere(Fslector)

.... but typing those two function names at the console prompt makes me think they may have some differences, but still for me they have seemed pretty much equivalent:

`:::`
getAnywhere

The second one was recommended by Uwe Ligges in his Help Desk article a few years back on "accessing the sources".

http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf

Can also be found at (a page with which I was unfamiliar with until RSeek just showed it to me):
http://developer.r-project.org/TechDocs/

That page looks to me to be an excellent second course in R after the "Introduction"

--
David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to