Skip to content
Prev 360889 / 398513 Next

changing factor to numbers without getting NAs

On 13/05/2016 7:56 AM, ch.elahe via R-help wrote:
You appear to have a comma as the decimal marker, so you can use 
type.convert(as.character(df$TSTMean), dec = ",", as.is = TRUE) instead 
of as.numeric().

A simpler approach might be to avoid getting the factor in the first 
place; if you read this data using read.table, there is the dec option 
to recognize a comma as the decimal separator.

Duncan Murdoch