[Rd] Documentation patch for 'match' and 'palette'

Michael Toews mwtoews at sfu.ca
Thu Sep 28 22:11:21 CEST 2006


Here is a patch to improve documentation for finding useful, yet newish, 
functions: 'findInterval' and 'colorRamp'. I think that it is worthwhile 
to mention these in the 'seealso' section of the similar 'match' and 
'palette' documents. I had difficulty finding these functions at first, 
as they have compound names. Modify the patch as needed:

Index: src/library/base/man/match.Rd
===================================================================
--- src/library/base/man/match.Rd       (revision 39542)
+++ src/library/base/man/match.Rd       (working copy)
@@ -65,6 +65,8 @@
   \code{\link{pmatch}} and \code{\link{charmatch}} for (\emph{partial})
   string matching, \code{\link{match.arg}}, etc for function argument
   matching.
+  \code{\link{findInterval}} similarly returns a vector of positions, but
+  finds numbers within intervals, rather than exact matches.
 
   \code{\link{is.element}} for an S-compatible equivalent of \code{\%in\%}.
 }
Index: src/library/grDevices/man/palette.Rd
===================================================================
--- src/library/grDevices/man/palette.Rd        (revision 39542)
+++ src/library/grDevices/man/palette.Rd        (working copy)
@@ -31,7 +31,7 @@
   \code{\link{colors}} for the vector of built-in \dQuote{named} colors;
   \code{\link{hsv}}, \code{\link{gray}}, \code{\link{rainbow}},
   \code{\link{terrain.colors}},\dots to construct colors;
- 
+  \code{\link{colorRamp}} to interpolate colors, making custom palettes;
   \code{\link{col2rgb}} for translating colors to RGB 3-vectors.
 }
 \examples{




More information about the R-devel mailing list