Possible Duplicates:
Convert factor to integer
R - How to convert a factor to an integer\numeric in R without a loss of information
I have read a text file where some of the columns with real number are read as factors into a data frame. How do i convert the factoe columns into numeric columns
You can use
as.numeric(as.character(x))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With