Dear R users;
A follow-up question regarding writing to a file with fixed precision:
Assuming for each column of x, I would like to have a different format, then I
modify the code as:
x.fmt - apply(x, 1, function(x) sprintf(%.14f %.10f %2.5f, x))
where three different formats are %.14f %.10f
On 5/18/2006 8:20 PM, YIHSU CHEN wrote:
Dear R users;
A follow-up question regarding writing to a file with fixed precision:
Assuming for each column of x, I would like to have a different format, then
I modify the code as:
x.fmt - apply(x, 1, function(x) sprintf(%.14f %.10f %2.5f, x))
On Mon, 10 Oct 2005, Marc Schwartz wrote:
On Mon, 2005-10-10 at 19:50 -0400, Richard Hedger wrote:
Hi,
I'm trying to ouput to a filled with a fixed precision:
eg. if I have data x=c(1.0,1.4,2.0), I want to be able to ouput the
following to a file:
1.00
1.40
On Tue, 2005-10-11 at 08:42 +0100, Prof Brian Ripley wrote:
On Mon, 10 Oct 2005, Marc Schwartz wrote:
On Mon, 2005-10-10 at 19:50 -0400, Richard Hedger wrote:
Hi,
I'm trying to ouput to a filled with a fixed precision:
eg. if I have data x=c(1.0,1.4,2.0), I want to be able to ouput the
Hi,
I'm trying to ouput to a filled with a fixed precision:
eg. if I have data x=c(1.0,1.4,2.0), I want to be able to ouput the following
to a file:
1.00
1.40
2.00
I was wondering if there was a function to do this in R?
Thanks,
Richard
Richard Hedger
On Mon, 2005-10-10 at 19:50 -0400, Richard Hedger wrote:
Hi,
I'm trying to ouput to a filled with a fixed precision:
eg. if I have data x=c(1.0,1.4,2.0), I want to be able to ouput the following
to a file:
1.00
1.40
2.00
I was wondering if there was a