Could anyone help with what should be a simple task? I have data as a
fixed format (fortran) table. I have no trouble getting it into R using
read.table. Each column is separated by a space, including the first
column that begins with a space, and aligned. It reads into R as if
separated by
why not write.table with sep=\t
On Sat, 27 Aug 2005, Duncan Golicher wrote:
Could anyone help with what should be a simple task? I have data as a
fixed format (fortran) table. I have no trouble getting it into R using
read.table. Each column is separated by a space, including the first
?sprintf
more C than fortran, but you get the idea :-)
cheers!
Sean
On 27/08/05, Duncan Golicher [EMAIL PROTECTED] wrote:
Could anyone help with what should be a simple task? I have data as a
fixed format (fortran) table. I have no trouble getting it into R using
read.table. Each column is
One way of creating fixed width output is to use 'sprintf' to create
the string and write the resulting data out. I used your input and
just selected columns 7-11 as an example. You will have to supply
whatever field width you want. I create a matrix and null out the row
and column names and