Hello I've used read.table to read a file that contains numbers such as 0.00001 when I write them back with write.table those numbers appear as 1e-5 How can I keep the old format? thanks -- View this message in context: http://r.789695.n4.nabble.com/number-format-writing-1e-5-instead-of-0-00001-tp3003831p3003831.html Sent from the R help mailing list archive at Nabble.com.
Henrique Dallazuanna
2010-Oct-20 13:39 UTC
[R] number format, writing 1e-5 instead of 0.00001
Try this: format(0.00001, scientific = F) On Wed, Oct 20, 2010 at 11:21 AM, skan <juanpide@gmail.com> wrote:> > Hello > > I've used read.table to read a file that contains numbers such as 0.00001 > > when I write them back with write.table those numbers appear as 1e-5 > > How can I keep the old format? > > thanks > > -- > View this message in context: > http://r.789695.n4.nabble.com/number-format-writing-1e-5-instead-of-0-00001-tp3003831p3003831.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
On Oct 20, 2010, at 9:21 AM, skan wrote:> > Hello > > I've used read.table to read a file that contains numbers such as > 0.00001 > > when I write them back with write.table those numbers appear as 1e-5 > > How can I keep the old format?To change globally for the session: ?options > options("scipen" = 3) > > 0.00001 [1] 0.00001 > 0.0000001 [1] 1e-07 > 0.000001 [1] 0.000001 Other options for output: ?format ?sprintf -- David Winsemius, MD West Hartford, CT