Re: [R] problem subsetting data frame with variable instead of constant

2012-02-10 Thread vaneet
Thanks guys, both those solutions work. I really appreciate the help! -- View this message in context: http://r.789695.n4.nabble.com/problem-subsetting-data-frame-with-variable-instead-of-constant-tp4376759p4376826.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] problem subsetting data frame with variable instead of constant

2012-02-10 Thread Sarah Goslee
This is likely a representation issue, as in R FAQ 7.31. ?"==" suggests that using identical and all.equal is a better strategy: x1 <- 0.5 - 0.3 x2 <- 0.3 - 0.1 x1 == x2 # FALSE on most machines identical(all.equal(x1, x2), TRUE) # TRUE everywhere Sa

Re: [R] problem subsetting data frame with variable instead of constant

2012-02-10 Thread Petr Savicky
On Fri, Feb 10, 2012 at 08:15:39AM -0800, vaneet wrote: > Hello, > > I've encountered a very weird issue with the method subset(), or maybe this > is something I don't know about said method that when you're subsetting > based on the columns of a data frame you can only use constants (0.1, 2.3, >

[R] problem subsetting data frame with variable instead of constant

2012-02-10 Thread vaneet
Hello, I've encountered a very weird issue with the method subset(), or maybe this is something I don't know about said method that when you're subsetting based on the columns of a data frame you can only use constants (0.1, 2.3, 2.2) instead of variables? Here's a look at my data frame called 'e