r - Scientific notation last digits omitted as zeros when write.csv -


i have lot of long numbers , r reads them scientific notation. when write.csv, scientific notation becomes incorrect number bunch of zeros following. example, 3.894e+13 become 38944400000000 after write.csv.

i have exact numbers in place zeros are. how keep exact number when exporting data file?

[update]: (1) problem because when save csv in excel, loses digits of long numbers. excel bug , use excel 2016.

(2) when above problem occurred, tired set options(scipen=999). when summarize data, summary statistics omitted in file. tried other files, (summary) works without losing precision. when print numbers, correct, summary statistics omitted after set options.

set the scipen option large enough number before writing csv file 1 way make work:

df = data.frame(x = 1232939143546532) options(scipen = 30) write.csv(df, "test.cv") 

this gives following:

"","x" "1",1232939143546532 

Comments