On 27/09/11 12:56, Henri-Paul Indiogine wrote:
I am trying to find the math behind the "tm" package findAssocs()

?findAssocs does not say anything besides "association" and "correlate"

Usually entering "findAssocs" at the CLI gives the code for a R
function, but in this case I obtain:

function (x, term, corlimit)
UseMethod("findAssocs", x)
<environment: namespace:tm>

Any ideas?

Yes.  Apparently the findAssocs() function is *generic* and there is
at least one *method* for it.

Type methods(findAssocs) to find the list of all available methods.

Then type the name of a particular method to see the code for
that method.  E.g. if there is a method "findAssocs.melvin" (which
is the method "dispatched" when you invoke

    findAssocs(x)

where "x" is an object of class "melvin") then typing

    findAssocs.melvin

will show the code for this method.

You should probably read up a bit on S3 methods and objects.

    ?S3Methods

will give you a start.

HTH

    cheers,

        Rolf Turner

______________________________________________
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