This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert scientific notation to float in R

I have large files with over 100 columns. I used read.table to read the files in R. Problems I have is that some values in a column are displayed in scientific notation such as 7.893e-06. When I "sort" these columns from large values to small values, the result is 7.893e-06 2.418e-05 2.373e-05 2.369e-05 0.998 . . .

How can I fix this problem? Thank you!

r

Hello mamemame!

We believe that this post does not fit the main topic of this site.

Not a bioinformatics question.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

1 answer

Try

options(scipen=999)

Or use the

as.integer()

approach somewhere in your program.

Log in to answer this question.