Hi,

I have a table where column 1 has ID numbers and column two has data, and I have
a vector containing a subset of those ID numbers. How can I create a new table
with only the rows from the old table that match the IDs in the vector, like
below:

Original Table:

ID     Value
1        123
2        123
3        123
4        123

vect: [2, 3]

New table:

ID     Value
2        123
3        123


Thank you so much!
-Nina

______________________________________________
R-help@r-project.org 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