> x <- c(3.45,3.40)
> format(x, nsmall=2)
[1] "3.45" "3.40"
> exportData(c(3.45, 3.40, .40), file="tmp.txt")
[1] 3
> exportData(c(3.45, 3.40, .40), file="tmp.txtf", type="FASCII", format="%5.2")
Warning messages:
The 'colNames' argument of exportData() is ignored for this export file
type. Column names will NOT be exported.
in: openDataForWrite(file = file, type = type, keep = keep, drop =
drop, filter = ....
[1] 3
>
exportData is designed for machine legibility. The trailing 0 and the lead 0
are redundant. Since you have a specific format of people legibility as your
goal,
it is necessary to tell the program about your requirements.
Rich
|