Re: [Rd] Bug in subsetting data frame (PR#13515)

From: Wacek Kusnierczyk <>
Date: Tue, 10 Feb 2009 14:34:21 +0100

Stavros Macrakis wrote:
> Don't know if this is the problem, but....
> It is a bad idea to set data.frame <- xxx since R has a single
> namespace for functions and variables.

it doesn't seem to be the problem.

c = c(0)
# 0, not the function `c`
# 1, not an error from application of 0 to 1


c = `list`
# list, not a vector
# the function `list`, not the value 0

the issue is, if you use a name as an operator, it's the first *function value*, not just *value*, found on the search path that will be used. in the example you referred to, if you assign a non-function value to data.frame, an attempt to apply data.frame will get the function from package:base:

data.frame = 0
find('data.frame', mode='function')

vQ mailing list Received on Tue 10 Feb 2009 - 12:38:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 10 Feb 2009 - 13:30:22 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive