[R] get rid of format padding
Ido M. Tamir
tamir at imp.univie.ac.at
Fri Nov 30 17:53:54 CET 2007
Dear readers,
I need to prevent the output of very large
integers in scientific format.
So I use format, but now the integers in the
resulting tab delimited output file are padded.
I tried justify="none" or "left", width=0 but nothing
helps.
1\tA\t10000\t10000
2\ta\t 1\t1
^^^
thank you very much for your suggestions,
ido
> vals <- c(10000,1)
> df <- data.frame(c("A","b"),format(vals),vals)
> write.table(df,"test.tab",sep="\t",header=FALSE,quote=FALSE)
> df <- data.frame(c("A","b"),format(vals,just="none"),vals)
More information about the R-help
mailing list