[S] Thank You

John Warner (jwarner@cscar.umich.edu)
Wed, 29 Apr 1998 08:31:24 -0400


Thanks to all who helped me with my formatting problem. When it comes to the
constrcution of summary tables I am now an enthusiastic
convert to Splus. - John Warner

============================================================================
I am having trouble with the cat, format, and round functions. A loop of the
following form

for (i in 1:4) {
x <- kruskal.test(t[,i+2],gp)[[3]]
z1 <- c(med[i,1],med[i,2],med[i,3],med[i,4])
z2 <- c(mn[i,1],mn[i,2],mn[i,3],mn[i,4])
z3 <- c(se[i,1],se[i,2],se[i,3],se[i,4])
cat( "\n",label[i]," Median",format( round(z1,5)),
"\n",blank, " Mean ",format( round(z2,5)),
"\n",blank, " S.E. ",format( round(z3,5)))
}

Produces output as follows

Media Median 0.0010 0.2545 0.1840 0.2510
Mean 0.1582 0.2740 0.2124 0.2100
S.E. 0.16755 0.15842 0.03433 0.01621
BCG Median 0.0010 0.1025 0.2510 0.2510
Mean 0.0928 0.2345 0.2514 0.2278
S.E. 0.16462 0.17260 0.03792 0.01792
hsp_65 Median 0.001 0.202 0.001 0.307
Mean 0.2708 0.2640 0.0766 0.2944
S.E. 0.20541 0.16006 0.02858 0.01663
SEA Median 0.0010 0.3905 0.0850 0.1410
Mean 0.0010 0.4065 0.1236 0.4936
S.E. 0.00000 0.23448 0.01806 0.85485

Can anyone tell me why all of the entries in this table do NOT have the same number
of digits? What can I do to make these number line up nicely?

Thanks in Advance
John Warner
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news