[R] write.table -- maintain decimal places

Jim Moon
Wed, 26 Jan 2011 00:16:37 -0000

Hello, All,

How can I maintain the decimal places when using write.table()?

Jim

e.g.

df:
  EFFECT2  PVALUE
1 0.023    0.88080
2 -0.260  0.08641
3 -0.114  0.45200

write.table(df,file='df.txt',quote=F,sep='\t',row.names=F)


df.txt:
EFFECT2    PVALUE
0.023      0.8808
-0.26      0.08641
-0.114     0.452

	[[alternative HTML version deleted]]