Bug 15882 - [ requires a positional argument, not mentioned in docs
Summary: [ requires a positional argument, not mentioned in docs
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: Documentation (show other bugs)
Version: R-devel (trunk)
Hardware: All All
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2014-07-14 21:05 UTC by Evelyn Mitchell
Modified: 2014-07-14 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evelyn Mitchell 2014-07-14 21:05:17 UTC
http://cran.r-project.org/doc/manuals/r-release/R-ints.html#g_t_002eInternal-vs-_002ePrimitive mentions

"The net effect is that argument matching for primitives intended for end-user use is done in the same way as for interpreted functions except for the six exceptions where positional matching is required."

but

?[

says 
"Argument matching

Note that these operations do not match their index arguments in the standard way: argument names are ignored and positional matching only is used. So m[j = 2, i = 1] is equivalent to m[2, 1] and not to m[1, 2]."

The key phrase being 'positional matching only'.

My suggested correction is to add [] to the list of primitives requiring positional matching in the documentation.