I have a character data frame in R which has NaNs in it. I need to remove any row with a NaN and then convert it to a numeric data frame.
If I just do as.numeric on the data frame, I run into the following
Error: (list) object cannot be coerced to type 'double'
1:
0:
As @thijs van den bergh points you to,
Is one way to do this.
Your error comes from trying to make a
data.framenumeric. Thesapplyoption I show is instead making each column vector numeric.