Re: [R] data.frame: how to extract parts

2009-01-17 Thread Ted Harding
On 17-Jan-09 02:57:13, Jörg Groß wrote: Hi, I have a problem with the R syntax. It's perhaps pretty simple, but I don't understand it ... I can extract a column from a data.frame with the following code for example ... b$row1[b$row1 == male] so I see all male-entries. But I cannot

[R] data.frame: how to extract parts

2009-01-16 Thread Jörg Groß
Hi, I have a problem with the R syntax. It's perhaps pretty simple, but I don't understand it ... I can extract a column from a data.frame with the following code for example ... b$row1[b$row1 == male] so I see all male-entries. But I cannot extract all lines of a data.frame depending

Re: [R] data.frame: how to extract parts

2009-01-16 Thread jim holtman
You are missing a comma. You are addressing the dataframe as if it were a matrix and you want to extract all the rows that match: only.male - b[b$row1 == male,] On Fri, Jan 16, 2009 at 9:57 PM, Jörg Groß jo...@licht-malerei.de wrote: Hi, I have a problem with the R syntax. It's perhaps