Hi,

A reproducible example would have been nice...

Here is one:
vect <- c(rep("| A010 |",3), rep("| A020 |",5), rep("| A021 |",2))
df <- data.frame(a=vect, b=rnorm(10), d=rnorm(10))
df[grep(pattern="A02", df$a), ]

HTH,
Ivan

Le 11/17/2010 10:16, Joel a écrit :
Hi

I got an table that contains this colum and i wonder if there is any nice
way to extract all rows that contains all dose that start with A02, so all
the rows that have A020 and A021 etc etc...

| A010 |
| A010 |
| A010 |
| A020 |
| A020 |
| A020 |
| A020 |
| A020 |
| A021 |
| A021 |


Thx for your help
//Joel

--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calan...@uni-hamburg.de

**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php

______________________________________________
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