<br><br><div><span class="gmail_quote">2007/4/29, Thomas Friedrichsmeier <<a href="mailto:thomas.friedrichsmeier@ruhr-uni-bochum.de">thomas.friedrichsmeier@ruhr-uni-bochum.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Well, printing in the order you suggest is certainly better (i.e. print all<br>three for each crosstab). However I suggest to spearate calculation and<br>printing into two loops, i.e. (reduced pseudo code):<br><br>#calculate
<br>for (...) {<br>   # calculate and store table()<br>   # calculate and store chisq.test()<br>}</blockquote><div><br>I don't know if and how this can be done.  I tried the list() way proposed in previous e-mail but no luck. I get only the first value of a table and for chisq,test only the statistic.
<br><br>Trying some things for the above I made a small change. Since we use as independent x it should be like this:<br>xytable(y[,i], x). <br>In this way x is in the rows and the dim(xytable)[2] are always the same. Also the barplots are in the right forms having in the horizontal axis the x variable. 
Chisq.test does not seem to be affected.<br><br>The y variable is treated as a data.frame now solving a problem occuring and converting the values of the variables from string to numbers.<br><br>Also in the rk.print(xtable(xytable)) added the digits=0 value because we expect only integers since the results are counts.
<br><br></div></div>Regards,<br>Ilias<br>