Re: [R] Formatting numeric values in a data frame

2009-02-25 Thread Pele
Jim - example is perfect - many thanks!!! Philipp - many thanks for your example also. jholtman wrote: > > This might do what you want: > >> x <- read.table(textConnection("ID x1 >> >> x2 x3 > + a1 0.0123334

Re: [R] Formatting numeric values in a data frame

2009-02-25 Thread jim holtman
This might do what you want: > x <- read.table(textConnection("ID x1 >x2 x3 + a1 0.0123334 0.2 12.8 + b3 0.477896366 0.2 9.6 +

Re: [R] Formatting numeric values in a data frame

2009-02-25 Thread Philipp Pagel
On Wed, Feb 25, 2009 at 01:19:36PM -0800, Pele wrote: > > Hi R users, > > I have a data frame that contains 10K obs and 200 variables > where I am trying to format the numeric columns to look > like the output table below (format to 2 decimal places) but I am > having no luck.. Can someone tell

[R] Formatting numeric values in a data frame

2009-02-25 Thread Pele
Hi R users, I have a data frame that contains 10K obs and 200 variables where I am trying to format the numeric columns to look like the output table below (format to 2 decimal places) but I am having no luck.. Can someone tell me the best way to accomplist this? Thanks in advance for any he