[R] write out data in format
Yuandan Zhang
yzhang4 at une.edu.au
Wed Jan 4 23:07:09 CET 2006
Hi,
how to write out data frame in format? for examples, I wrote out a data
using 'write.table(siredata, file='siredata.txt', row.names=F,
quote=F)'.
it produced data alike this:
2882 1 0 0 0 0 L1600481991910012 L1600011988880196
2883 0.79 0.21 0 0 21 L1622881993930001 L1600481991910012
2884 0.84 0.16 0 0 23 L1622881993930005 L1600481991910012
2885 0.9 0.1 0 0 23 L1622881993930027 L1600481991910012
2886 0.87 0.13 0 0 23 L1622881993930038 L1600481991910012
2887 0.9 0.1 0 0 27 L1622881993930111 L1600481991910012
2888 0.81 0.19 0 0 22 L1622881993930113 L1600481991910012
In fact i want it formated as
2882 1.00 0.00 0.00 0.00 0 L1600481991910012 L1600011988880196
2883 0.79 0.21 0.00 0.00 21 L1622881993930001 L1600481991910012
2884 0.84 0.16 0.00 0.00 23 L1622881993930005 L1600481991910012
2885 0.90 0.10 0.00 0.00 23 L1622881993930027 L1600481991910012
2886 0.87 0.13 0.00 0.00 23 L1622881993930038 L1600481991910012
2887 0.90 0.10 0.00 0.00 27 L1622881993930111 L1600481991910012
2888 0.81 0.19 0.00 0.00 22 L1622881993930113 L1600481991910012
Thanks for your help
Yuandan
More information about the R-help
mailing list