Mark Leeds wrote: > Hi Ricardo: I'm glad it helped but check > > regexpr("Jalapa", as.character( unidad ) ) != -1 > > because I think it should be > > regexpr("Jalapa", as.character( DF$unidad ) ) != -1 > > if unidad is a column of DF. Checked! attach(DF) did the trick! :-) Greetings, Ricardo -- Ricardo Rodríguez Your XEN ICT Team