Bug 15957 - removeSource() fails when dimension subscripts are empty
Summary: removeSource() fails when dimension subscripts are empty
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Language (show other bugs)
Version: R 3.1.1
Hardware: x86_64/x64/amd64 (64-bit) Linux-Ubuntu
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2014-09-01 09:55 UTC by Richard Scriven
Modified: 2014-09-08 17:36 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Scriven 2014-09-01 09:55:41 UTC
Base function removeSource() seems to be consistently failing when the function calls a vector subset with a missing index. For example, 

    foo <- function(x) { x[1, ] }
    removeSource(foo)

returns the following error: 

    Error in recurse(part[[i]]) : argument "part" is missing, with no default

Yet when the subscripts are not empty, the function works as expected

    bar <- function(x) { x[1, 2] }
    removeSource(bar)

returns as expected 

foobar <- function(x) { x[] }  also fails 

More info is in this Stack Overflow question

http://stackoverflow.com/questions/25580316/removesource-with-subset-fails-on-empty-j-argument
Comment 1 Duncan Murdoch 2014-09-08 17:36:07 UTC
Confirmed, and soon to be fixed in R-devel and R-patched.