[GRASS-dev] Re: [GRASS GIS] #430: i.pca's output and history logged "Comments" disagree

Hamish hamish_b at yahoo.com
Tue Mar 17 07:31:25 EDT 2009

> Patch attached (maybe there is a better way to write it):

> Eigen values, (vectors), and [percent importance]:
> PC1 4712.17 (-0.2798,-0.3332,-0.5054,-0.0015,-0.5341,-0.5196) [ 84.0537% ]

just cosmetics, but please could it look like:
(G_message version)

> PC1 4712.17 ( -0.2798, -0.3332, -0.5054, -0.0015, -0.5341, -0.5196 ) [ 84.05% ]

ie keep percentage as %.2; keep a space between vector components; and (less importantly) keep the space before and after the whole vector component set.

the idea is that the increased component prec is needed so you can reconstruct the PCs, but percentage is only informational so it needs less (& you can recalc it from the eigenvalues if you want more). The r.info -h version should have it all align in a nice table so that you can column-wise import it as fixed-width into a speadsheet or box-select the values in a nice text editor that allows that (nedit, wordstar, etc). without the extra whitespace it is a bit too cluttered for my liking.
G_message() compacts whitespace so you don't see the nice formatting in the normal output, and is a byproduct so shouldn't be sent to stdout by default.



More information about the grass-dev mailing list