Displaying 1 result from an estimated 1 matches for "qw22e".
2008 Apr 11
1
How to match some patterns in a matrix
Dear all,
I have a data frame called x2, which looks like:
> dim(x2)
[1] 2237 2
> x2[1:4,1:2]
name id
1 STye hggd3
2 STy2 bffbd2
3 qw22e bdbdbbbd7
4 deffrdff nnshfd3
and a vector called y, which looks like:
> dim(y)
[1] 135 1
> y[1:3,1]
[1] ABCDE BDH5 DESRP1
y is a subset of x2$name and I want to select the rows in x2 whose 'name'
match
y. Is there an easy way to do so?
I tr...