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.
>
>
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ß wrote:
> Hi,
>
> I have a problem with the R syntax.
> It's perhaps pretty simple, but I
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 dependin
3 matches
Mail list logo