Re: [R] problem subsetting data.frame in R version 2.15.2 for Windows

2013-03-21 Thread PIKAL Petr
.org > Subject: Re: [R] problem subsetting data.frame in R version 2.15.2 for > Windows > > OK, I just had a look at the Good Practice section of ?attach, it > indeed looks bad... > > Maybe this danger should be emphasized in ?attach, or the function even > deprecated

Re: [R] problem subsetting data.frame in R version 2.15.2 for Windows

2013-03-21 Thread Pierrick Bruneau
OK, I just had a look at the Good Practice section of ?attach, it indeed looks bad... Maybe this danger should be emphasized in ?attach, or the function even deprecated (why maintaining ugly patterns when better solutions exist?) On Thu, Mar 21, 2013 at 8:58 AM, Michael Weylandt < michael.weyla.

Re: [R] problem subsetting data.frame in R version 2.15.2 for Windows

2013-03-21 Thread Jorge I Velez
Or simply subset(dat, a > 0) HTH, Jorge.- On Thu, Mar 21, 2013 at 6:58 PM, Michael Weylandt <> wrote: > > > On Mar 21, 2013, at 7:39, Pierrick Bruneau wrote: > > > Hi Borja, > > > > You may issue: > > > > attach(data) > > No -- bad idea -- dangerous -- confusing statefulness, etc. (See > expl

Re: [R] problem subsetting data.frame in R version 2.15.2 for Windows

2013-03-21 Thread Michael Weylandt
On Mar 21, 2013, at 7:39, Pierrick Bruneau wrote: > Hi Borja, > > You may issue: > > attach(data) No -- bad idea -- dangerous -- confusing statefulness, etc. (See explanations in the archives as to why) > > which results in adding your column names to the search path of R for name > resol

Re: [R] problem subsetting data.frame in R version 2.15.2 for Windows

2013-03-21 Thread Pierrick Bruneau
Hi Borja, You may issue: attach(data) which results in adding your column names to the search path of R for name resolving. Pierrick Bruneau CRP Gabriel Lippmann On Wed, Mar 20, 2013 at 11:17 PM, Borja . wrote: > Good day. > I create a data frame like this: > > data <- data.fr

Re: [R] problem subsetting data.frame in R version 2.15.2 for Windows

2013-03-20 Thread Rui Barradas
Hello, Inline. Em 20-03-2013 22:17, Borja . escreveu: Good day. I create a data frame like this: > data <- data.frame(a=1:10,b=11:20,c=21:30) I can subset this data.frame by saying: > data[data$a>7,] and I get this result a b c

[R] problem subsetting data.frame in R version 2.15.2 for Windows

2013-03-20 Thread Borja .
Good day. I create a data frame like this: > data <- data.frame(a=1:10,b=11:20,c=21:30) I can subset this data.frame by saying: > data[data$a>7,] and I get this result a b c8 8 18 28 9 9 19 29