Retrieving all the rows with number 1
<p>Probably really simple but I am trying to retrieve all the rows that contain the number 1. I tried grep without success and it seems I am really dumb using regular expressions.</p>

<p>I have a data frame that looks like this:</p>

<pre><code>t = data.frame(C1 = c(1,2,23,26,45), C2 = c("Plate1","Plate1","Plate2","Plate2","Plate4"), C3 = c("A1","A2","B10","C11","D1"), C4 = c(3,6,7,1,2))

t

  C1     C2  C3 C4
1  1 Plate1  A1  3
2  2 Plate1  A2  6
3 23 Plate2 B10  7
4 26 Plate2 C11  1
5 45 Plate4  D1  2  
</code></pre>

<p>I would like to retrieve the rows where C3 contains 1, but not 10 or 11 which means row 1 and 5 with A1 and D1. </p>

<p>So the end result would be:</p>

<pre><code>  C1     C2  C3 C4
1  1 Plate1  A1  3
5 45 Plate4  D1  2 
</code></pre>

<p>Thanks in advance.</p>