works perfect, thank you :-) -- View this message in context: http://r.789695.n4.nabble.com/substring-if-a-record-has-a-n-tp4689857p4689860.html Sent from the R help mailing list archive at Nabble.com.