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

2009-02-10 Thread William Dunlap
ject: Re: [Rd] Bug in subsetting data frame (PR#13515) [ lots deleted ] > > Indeed! It is quite surprising that functions are defined > using ordinary > > assignment, but function lookup is different from normal variable > > evaluation, e.g. that after c<-4, c(10) is different fr

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

2009-02-10 Thread Duncan Murdoch
Stavros Macrakis wrote: On Tue, Feb 10, 2009 at 8:31 AM, Duncan Murdoch wrote: Stavros Macrakis wrote: It is a bad idea to set data.frame <- xxx since R has a single namespace for functions and variables. That's not quite accurate. R mixes functions and variables in namespa

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

2009-02-10 Thread Stavros Macrakis
On Tue, Feb 10, 2009 at 8:31 AM, Duncan Murdoch wrote: > Stavros Macrakis wrote: > >> It is a bad idea to set data.frame <- xxx since R has a single >> namespace for functions and variables. >> >> > That's not quite accurate. R mixes functions and variables in namespaces, > but it has lots of nam

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

2009-02-10 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > 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. >> >> >> > > > the issue is, if you use a name as an operator, it's the first

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

2009-02-10 Thread Duncan Murdoch
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. That's not quite accurate. R mixes functions and variables in namespaces, but it has lots of namespaces, and it usually do

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

2009-02-10 Thread Wacek Kusnierczyk
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) c # 0, not the function `c` c(1) # 1, not an error from application o

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

2009-02-10 Thread Wacek Kusnierczyk
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) c # 0, not the function `c` c(1) # 1, not an error from application o

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

2009-02-10 Thread Stavros Macrakis
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. -s On 2/10/09, xinlee...@stat.math.ethz.ch wrote: > Full_Name: Xin Lee > Version: 2.8.0 > OS: Windows XP > Submission from: (NULL) (193.200.15

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

2009-02-10 Thread Thomas Lumley
On Tue, 10 Feb 2009 xinlee...@stat.math.ethz.ch wrote: I discover annoying bug in subsetting data frame. Here is reproducable examples: These are not bugs. data.frame <- data.frame(x = runif(5), y = runif(5), row.names = c('a','b','c','d','e') subset <- data.frame['x'] subset['a',] wor

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

2009-02-10 Thread xinlee883
Full_Name: Xin Lee Version: 2.8.0 OS: Windows XP Submission from: (NULL) (193.200.150.23) Dear developer I discover annoying bug in subsetting data frame. Here is reproducable examples: > data.frame <- data.frame(x = runif(5), y = runif(5), row.names = c('a','b','c','d','e') > subset <- data.