Hello! When using the command "write.table" I want to convert the format: 5e-04 to .0005. How can I do it? The only option I found is to use write.matrix but then I cant add rownames. Thank you Ronen [[alternative HTML version deleted]]
See the "scipen" argument in ?options. write.table(data.frame(x = 0.0005)) options(scipen = 1) write.table(data.frame(x = 0.0005)) --sundar fluss wrote:> Hello! > When using the command "write.table" I want to convert the format: 5e-04 > to .0005. How can I do it? > The only option I found is to use write.matrix but then I cant add rownames. > Thank you > Ronen > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> Hello! > When using the command "write.table" I want to convert the format: 5e-04 > to .0005. How can I do it? > The only option I found is to use write.matrix but then I cant add rownames. > Thank you > Ronen?options, see scipen. Or, use format() to convert table before writing it. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595