<br><br><div><span class="gmail_quote">2007/4/25, 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;">
Hi,<br><br>On Thursday 19 April 2007, I. Soumpasis wrote:<br>> The way I thought to implement all three parts (using "dependent" and<br>><br>> "independent" variables) is something like this pseudocode:
<br>> for (i=0; i<length(independents), ++i){<br>> table (dependent, independents[i])<br>> barplot (table (dependent, independent[i]))<br>> chisq.test (dependent, independent[i])<br>> }<br>><br>> I do not know how doable is this. I also do not know if we can and how to
<br>> count the number of the "independent" variables. How do you see this idea?<br><br>ok, I see now. I think both modes have their merits. The one that simply does<br>crosstabulation of all input variables (factors) as table (x, y, z) would do.
<br>And the way you propose, where the factors are crossed pairwise. In the long<br>run, we'll likely want to have both. In the short term, whatever gets done<br>first will be available, first.<br><br>I guess we may actually need two separate plugins for this: A "2 dimensional
<br>crosstabs" and an "n dimensional crosstab" plugin, as it's probably hard to<br>unite both in a single (comprehensible) GUI. The first would follow your<br>approach, the second would create a single table with as many dimensions as
<br>input variables. Only the first would really need chisq.test and barplot<br>functionality. Do you want to go ahead with the first one?</blockquote><div><br>I have made some sketching on the first these days.<br><br>I implement it in R. Here is how it comes:
<br><br>for(i in 1:length(urin1)){<br>xytable<-table(urin1[,18], urin1[,i])<br>rk.print(xytable)<br>rk.graph.on()<br>barplot(xytable, col=rainbow(length(xytable)))<br>rk.graph.off()<br>rk.print(chisq.test(xytable))<br>
}<br><br>1.Do you believe that we could/should do it in R or in php? <br><br>2. should the y variable  take its values like this?<br>$yxvarsstring = join (", ", split ("\n", getRK_val ("x")));
<br>y=cbindlist (<? echo ($xvarsstring); ?>)<br><br>3. What do you believe for the preview option? should it stay or should it go?<br><br>The "n dimensional crosstab" plugin seems relatively easier to implement. I tried with ftable: 
rk.print(ftable(bla,bla,bla) <br>and works fine.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">However, both should probably also allow saving the results (in the first case
<br>as a list of tables, in the second case as a single table).</blockquote><div><br>What do you mean? To create a new variable in R workspace with the results? <br></div><br>Regards,<br>Ilias<br></div><br>