I have a matrix, I would like to use it like I use where query on an SQL table

Let's say my matrix is

> wok
    who  task
1   joe task1
2   joe task2
3   joe task3
4  jack task1
5  jack task2

I want to extract a matrix that contains only rows where
    who = "joe" and task != "task2"

The result would be the following matrix

1   joe task1
2   joe task3

How can I do that with R ?

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to