[rkward-devel] New plugin and functions
I. Soumpasis
nono.231 at gmail.com
Wed Apr 25 16:13:53 UTC 2007
2007/4/25, Thomas Friedrichsmeier <thomas.friedrichsmeier at ruhr-uni-bochum.de
>:
>
> Hi,
>
> On Thursday 19 April 2007, I. Soumpasis wrote:
> > The way I thought to implement all three parts (using "dependent" and
> >
> > "independent" variables) is something like this pseudocode:
> > for (i=0; i<length(independents), ++i){
> > table (dependent, independents[i])
> > barplot (table (dependent, independent[i]))
> > chisq.test (dependent, independent[i])
> > }
> >
> > I do not know how doable is this. I also do not know if we can and how
> to
> > count the number of the "independent" variables. How do you see this
> idea?
>
> ok, I see now. I think both modes have their merits. The one that simply
> does
> crosstabulation of all input variables (factors) as table (x, y, z) would
> do.
> And the way you propose, where the factors are crossed pairwise. In the
> long
> run, we'll likely want to have both. In the short term, whatever gets done
> first will be available, first.
>
> I guess we may actually need two separate plugins for this: A "2
> dimensional
> crosstabs" and an "n dimensional crosstab" plugin, as it's probably hard
> to
> unite both in a single (comprehensible) GUI. The first would follow your
> approach, the second would create a single table with as many dimensions
> as
> input variables. Only the first would really need chisq.test and barplot
> functionality. Do you want to go ahead with the first one?
I have made some sketching on the first these days.
I implement it in R. Here is how it comes:
for(i in 1:length(urin1)){
xytable<-table(urin1[,18], urin1[,i])
rk.print(xytable)
rk.graph.on()
barplot(xytable, col=rainbow(length(xytable)))
rk.graph.off()
rk.print(chisq.test(xytable))
}
1.Do you believe that we could/should do it in R or in php?
2. should the y variable take its values like this?
$yxvarsstring = join (", ", split ("\n", getRK_val ("x")));
y=cbindlist (<? echo ($xvarsstring); ?>)
3. What do you believe for the preview option? should it stay or should it
go?
The "n dimensional crosstab" plugin seems relatively easier to implement. I
tried with ftable: rk.print(ftable(bla,bla,bla)
and works fine.
However, both should probably also allow saving the results (in the first
> case
> as a list of tables, in the second case as a single table).
What do you mean? To create a new variable in R workspace with the results?
Regards,
Ilias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20070425/771892d3/attachment.html>
More information about the Rkward-devel
mailing list