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. ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
