[R] grep() exclude certain patterns?

Greg Snow Greg.Snow at imail.org
Sat Dec 5 06:36:57 CET 2009


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Peng Yu
> Sent: Friday, December 04, 2009 2:19 PM
> To: r-help at stat.math.ethz.ch
> Subject: Re: [R] grep() exclude certain patterns?
> 

[snip]

> Here is another bad example. See ?rep. The Usage section has 'rep(x,
> ...)'. However, '...' is only explained later in Arguments. I know
> that it is probably because '...' is from functions underlying rep().
> But it does not matter to end users whether they are from an
> underlying function or not. Why not put the arguments in the Usage
> section?
> 
> Similar cases can be found in the help of many functions.
> 

The ... argument is very common throughout many functions.  It is documented in section 10.4 of "An Introduction to R" which should be read early on in any attempt to learn R.

Any time that you see ... in the usage section, it just means that that function can take additional arguments that will probably be passed on to other functions called by that one, or sometimes handled specially without predefined names.  Often that is all you need to know.  Sometimes the additional arguments are in the following lines of the usage section.

For rep, you don't have to scroll that far to see what the options are, and rep is one of the functions that handles its arguments in a special way.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111




More information about the R-help mailing list