From macrakis at alum.mit.edu  Tue Feb 10 13:59:41 2009
From: macrakis at alum.mit.edu (Stavros Macrakis)
Date: Tue, 10 Feb 2009 07:59:41 -0500
Subject: [Rd] Bug in subsetting data frame (PR#13515)
In-Reply-To: <20090210102506.CB966282EF48@mail.pubhealth.ku.dk>
References: <20090210102506.CB966282EF48@mail.pubhealth.ku.dk>
Message-ID: <8b356f880902100459n321c321ew1ee4ab3c9a7ddb0f@mail.gmail.com>

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, xinlee883 at stat.math.ethz.ch <xinlee883 at stat.math.ethz.ch> wrote:
> 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.frame['x']
>> subset['a',]
> work
>
>> subset <- data.frame$x
>> subset['a',]
> not work
>
>> subset <- data.frame['a',]
>> subset[,'x']
> work
>
>> subset <- data.frame[,'x']
>> subset['a',]
> not work
>
> I hope this is easy fix for you and works corectly soon.
>
> Sincerely,
> Xin Lee
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



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