[R] truly object oriented programming in R
Gabor Grothendieck
ggrothendieck at myway.com
Thu Aug 12 19:54:47 CEST 2004
Jason Liao <jg_liao <at> yahoo.com> writes:
> In the KD tree, we have this
>[...]
> recursive data structure? If yes, can you give a sample program?
>
For an example, see the R loess.smooth function which uses k-d trees.
Try ?loess.smooth for info and just type
loess.smooth
like that exactly to see source. It calls a C function that calls a FORTRAN
function to do the real work, presumably for efficiency reasons. You can
view those by looking at:
loess-README
loessc.c
loessf.f
at this link:
https://svn.r-project.org/R/branches/R-1-9-patches/src/library/stats/src/
Unfortunately the above is in FORTRAN whereas you seem to be looking for a
pure R solution but hopefully that will get you started.
More information about the R-help
mailing list