[RkWard-devel] quantile plug-in
Jacolin Yves
yjacolin at gloobe.org
Sun Feb 19 07:35:58 UTC 2006
Hello,
Soory I was not clear, And I mix several things ...
Ok, I think you need to use a global variable
(http://www.php.net/manual/en/language.variables.scope.php, change 'en' to
'de' if your are german speaking), global variable allow to use a variable
created in a function out of this function, ie in an other function I think
as well !
To declare such function :
global $getRK ;
if getRK is a variable.
It is only a php problem (for as far as I understand plugin, so it is not so
far :-(
For the wiki, I don't know. No idea. But I don't understand exactly what you
mean :-)
So I try something :
To contribute, you can translate documentation in the wiki, and finaly I will
integrate in the website or just create a link to follow the evolution
easily !
Translate documentation in KdeDocbook format
(http://l10n.kde.org/docs//markup/) in english and in german, I will do it in
french, but no documentation exist yet, want to begin ?
You can improve the user part of the wiki, of course, the developer part is
more complete as RKWark is in heavy development, but I think you right if you
think it is better to begin soon ;-) (sorry for my english :-D)
About me, I can not work again on RKWard until few monthes. Nowadays, I am ill
(but fell better, thank you :-p), I am finishing my year in university this
week ! And I have no training period yet, etc. But I am quite exiting to work
again on RKWard project (website, documentation, plugin ...).
One more thing : I will lose my internet connection the 28 of february for a
few days/weeks.
Y.
Le Dimanche 19 Février 2006 00:54, Stefan Rödiger a écrit :
> Jacolin Yves wrote:
> > I do not know how the plugin must to be used, but you use two php
> > function, in the first I think you need to "export"/ return the variable
> > or use global variable to define (search something like @ or & symbol in
> > php function something like this :
> > function (&global, input) {} for exemple,
> > or as well in the function : return $variable where variable is an array.
> >
> > I do not know if it is a good advice ... I am ill so may be I did not
> > undestand.
> >
> > Y.
> >
> > Le Samedi 18 Février 2006 12:53, Stefan Rödiger a écrit :
> >> Hi RKWardians,
> >>
> >> I have a new question. Right now I'm working on a quantile plug-in. So
> >> far it is working but I can not figure out how to apply the "names"
> >> attribute within the HTML output. It's important because I use
> >> user-defined sequences for the probabilities e.g. seq(0,1,0.1) equals
> >> 0%, 10%, 20%, ..., 90%, 100%. This means if the user "needs" more then
> >> the common quartiles (0,1,0.25) he can also apply finer increments.
> >>
> >> Example:
> >>
> >> In R is the code:
> >>
> >> a=c(1,2,3,4,5,6,7,8,9,10)
> >> quantile(a, probs=seq(0,1,0.1))
> >> 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
> >> 1.0 1.9 2.8 3.7 4.6 5.5 6.4 7.3 8.2 9.1 10.0
> >>
> >> In RKWard (php):
> >> //a corresponds to <? getRK ("x"); ?>
> >>
> >> <?
> >> function preprocess () {
> >> }
> >>
> >> function calculate () {
> >> ?>rk.temp = quantile (<? getRK ("x"); ?>, na.rm= <? getRK ("narm"); ?>,
> >> type = <? getRK ("samplequantile"); ?>, name = <? getRK ("names"); ?>,
> >> probs = seq(<? getRK ("probs1"); ?>, <? getRK ("probs2"); ?>, <? getRK
> >> ("probs3"); ?>))
> >>
> >> rk.temp.date = date()
> >> <?
> >> }
> >>
> >> function printout () {
> >>
> >> //fetch some values from RKWard and assign some PHP-variables
> >>
> >> $x = getRK_val ("x.shortname");
> >>
> >> //produce the output
> >> ?>
> >> cat ("<h1>Quantile</h1>")
> >>
> >> cat ("<table border = \"1\">")
> >> cat ("<TR><TD>Method:</TD><TD><? getRK ("samplequantile");
> >> ?></TD><TD>na.rm: <? getRK ("narm"); ?></TD></TR>")
> >> cat ("<TR><TD>created:</TD><TD>",rk.temp.date,"</TD></TR>")
> >> cat ("<TR><TD></TD></TR>")
> >> cat ("<TR><TD>Variable</TD><TD>quantile</TD></TR>")
> >> cat ("<TR><TD>dummy</TD><TD>", rk.temp,"</TD></TR>")
> >> cat ("</table>")
> >> <?
> >> }
> >>
> >> function cleanup () {
> >> ?>
> >> rm (rk.temp)
> >> rm (rk.temp.date)
> >> <?
> >> }
> >> ?>
> >> ...
> >>
> >> But "0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%" will not be
> >> shown within the table. What must be done to get it working?
> >>
> >>
> >> -------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> >> files for problems? Stop! Download the new AJAX search engine that
> >> makes searching your log files as easy as surfing the web. DOWNLOAD
> >> SPLUNK!
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> >> _______________________________________________
> >> RKWard-devel mailing list
> >> RKWard-devel at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/rkward-devel
>
> Hi Yves,
>
> I'm quite new to this PHP, XML sutff. Therefore I'll will need a more
> detailed information what you mean (actually I don't get the idea).
>
> Greetings,
>
> Stefan.
>
> BTW, about the wiki I still have no idea how to contribute. In my
> opinion is the wiki something that is no so important. A help (which
> could be later on adopted in the wiki) seems to me more important.
> However, right now I think it's better to make RKWard more popular and
> to extend the functionality by plug-ins. Making it more usable makes it
> more attractive to people with less interest in the technical part. But
> these might be more interested in writing stuff for the wiki. What do
> you think?
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> RKWard-devel mailing list
> RKWard-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rkward-devel
--
"J'aimerais être une cigarette pour naître au creux de tes mains, vivre sur
tes lèvres et mourir à tes pieds."
---
Yves Jacolin
2 rue de la vigne
42 000 Saint Étienne
Port. : 06 64 28 27 92
Tel. : 04 77 32 07 64
Freebox : 0872 14 2008
http://yjacolin.gloobe.org
http://questioniup.gloobe.org
http://www.gloobe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20060219/ea155519/attachment.sig>
More information about the Rkward-devel
mailing list