Skip to content
Prev 260805 / 398502 Next

R as.numeric()

On 25/05/2011 9:20 a.m., Lutz Fischer wrote:
Your problem is the conversion to factors when the data is read. Use

options(stringsAsFactors = FALSE)

before you read the data, then the mixed columns of numeric and missing 
will be read as character data and the conversion to numeric will go as 
you expect. (But I haven't tested this.)

David Scott