as_numeric function

Convert variable to numeric avoiding potential issues with factors