[R] contourLines() documentation

Ben Bolker bolker at ufl.edu
Wed Aug 26 23:48:22 CEST 2009




Derek Lacoursiere wrote:
> 
> Hello, 
> 
> I have searched for documentation on the function contourLines's algorithm
> but cannot find a thing.  I am about to submit a paper to a journal but
> cannot yet do so because I need to provide some reference for this
> function.  Does anyone know what algorithm is used for this function?
> 
> Thanks,
> 
> Derek Lacoursiere
> 

>From ?contourLines:

There is currently no documentation about the algorithm. The
     source code is in 'R_HOME/src/main/plot3d.c'.

I can tell you (to save you downloading the source code of R and
looking) that there isn't very much additional reference information
there, just the algorithm itself.  The algorithm is not *that* complicated
--
depending on your level of programming expertise you could probably
figure it out for yourself -- but presumably you trust the algorithm
yourself, you just need a reference to how it's done.  Looking at the
SVN log for plot3d.c shows, at the very beginning, 

r1284 | ihaka | 1998-05-24 18:45:23 -0400 (Sun, 24 May 1998) | 3 lines

New (very experimental) persp function together with contour and image
code moved from plot.c.

looking at the SVN log for plot.c doesn't help very much -- suggest the
origins of this function are "lost in the mists of time".

 On the other hand, taking another tack, ?contour gives

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

is that, or just referencing R, good enough?   

I don't have access to a copy of this book at the moment, so can't
tell you what it says about the contour algorithm used (and Google Books
doesn't have a preview for this book).

  Ben Bolker






-- 
View this message in context: http://www.nabble.com/contourLines%28%29-documentation-tp25151467p25160250.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list