Dear Help-Rs,
 
I'm working with a file that contains large numbers and I need to export them 
"as is".  for example take:
 

x <- 
c(27104010002005,27104020001805,27104090001810,90050013000140,90050013000120)
y <- c(1:5)
df <- data.frame(cbind(x,y))
 
When I then try a simple:
write.csv(df,file="df.csv")
 
I get:
 x y
1 2.7104E+13 1
2 2.7104E+13 2
3 2.71041E+13 3
4 9.005E+13 4
5 9.005E+13 5
 
Then I tried:
options(scipen=999)
df$x <- as.character(df$x)
write.csv(df,file="df.csv")
 
and I still get:
 x y
1 2.7104E+13 1
2 2.7104E+13 2
3 2.71041E+13 3
4 9.005E+13 4
5 9.005E+13 5
 
How can I have R write the file so it looks like this:
 x y
1 27104010002005
2 27104020001805
3 27104090001810
4 90050013000140
5 90050013000120
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to