Bug 15876 - help for data.frame subset operator does not indicate that i and j may be logical
Summary: help for data.frame subset operator does not indicate that i and j may be log...
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: Documentation (show other bugs)
Version: R 3.0.2
Hardware: x86_64/x64/amd64 (64-bit) OS X Mavericks
: P5 trivial
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2014-07-09 12:07 UTC by Tim Bergsma
Modified: 2014-07-09 12:07 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 Tim Bergsma 2014-07-09 12:07:47 UTC
See help('[.data.frame'): Extract or Replace Parts of a Data Frame.  

Description for i, j arguments reads: "elements to extract or replace. For [ and [[, these are numeric or character or, for [ only, empty. "

Of course, i, j may also be logical (recycled), e.g. ....

Theoph[FALSE,TRUE]
[1] Subject Wt      Dose    Time    conc   
<0 rows> (or 0-length row.names)

I can't remember where this behavior is documented.  Not seeing it at the links below.

http://cran.r-project.org/doc/manuals/R-intro.html
http://cran.r-project.org/doc/manuals/r-release/R-lang.html