added R code for converting string to numerics