From http://stackoverflow.com/questions/2288485/how-to-convert-a-data-frame-column-to-numeric-type/2293313#2293313
converting variables types