number represented as E in spite of using scipen in R

418 views Asked by At

I have a number like '102622812'. I have used scipen as follows

options(scipen=999)

But When I write the number to a file using write.csv, I still get it in a format like 1.03E+08

I have also tried converting this column to character type and writing to the file. I still get the same problem.

1

There are 1 answers

0
Molx On BEST ANSWER

Even if the .csv file is saved without scientific notation, spreadsheet software like Excel will display them in scientific notation. Some options to check the real output are:

  • Open the file in a simple text editor, like Notepad or Gedit
  • Use readLines("file.csv") on R.
  • Print the file contents in terminal (type file.csv on Windows, cat file.csv on Linux/Mac).