Thank you very much. :-) > as.integer(substring(as.character(z), 2, 2)) [1] 8 > as.integer(foo2(z,2)) [1] 8 -- View this message in context: http://www.nabble.com/the-integer-of-a-given-location-tp25418729p25419555.html Sent from the R help mailing list archive at Nabble.com.