[RkWard-devel] New Plug-ins

SJR stefan_roediger at gmx.de
Mon Jan 1 21:17:42 UTC 2007


Am Montag, 1. Januar 2007 21:42 schrieb Thomas Friedrichsmeier:
> Hi Stefan,
>
> On Sunday 31 December 2006 01:16, SJR wrote:
> > I added a bunch of plug-ins for simple distributions normality tests and
> > plots. For the normality tests I need is a simple way to check if the
> > data are have a certain length. For example for the lillie.test(x) must a
> > numeric vector be greater than 4 and for sf.test(x) between 5 and 5000.
> >
> > Any comments?
>
> In fact we already had some code to check for dimensionality and length,
> but no way to specify this for a varslot, yet. I've just added the
> following attributes to <varslot>:
>
> - num_dimensions
> The number of dimensions, an object needs to have. "0" (the default) means,
> any number of dimensions is acceptable. (optional, defaults to "0")
>
> - min_length
> The minimum length, an object needs to have in order to be acceptable.
> (optional, defaults to "0")
>
> - max_length
> The maximum length, an object needs to have in order to be acceptable.
> (optional, defaults to the largest integer number representable on the
> system)
>
> Is that, what you were looking for?

Well, yes I think that's what I'm looking for. I didn't find these information 
in "Introduction to Writing Plugins for RKWard". My version might be 
outdated. What will happen to numeric vectors where the length is not in the 
given range. Will they be skipped or ...?

Update, I just saw the changes in SVN. Thanks!

>
> > @ Thomas please give me some feed back about my changes and plug-ins
> > regarding quality and so on.
>
> I haven't looked at the new plugins in details, yet (I will, soon). Some
> rather general comments so far:
>
> 1) Will you remember to add ChangeLog entries?

Since I use kdesvn I usually add entries there. But I never checked if they 
appear somewhere. So next time I will add my changes accordingly to 
ChangeLog. Sorry for that.

> 2) When adding new plugin files, we need to make sure to add those to the
> distribution. To do this, follow this procedure:
> - cd to the "plugins" directory in your working copy; there should be a
> script "makemakefileam.php"
> - run
> ./makemakefileam.php > Makefile.am
> - run make once to make sure the makefile is ok, then commit.
> If you don't want to mess with the makefiles, that's ok, and I can do that.
> In that case, please give me a short reminder before the next release, so I
> won't forget.

Yes, let's do it the less messy way. I'll give you a reminder.

> 3) I notice you're doing a lot of cat (HTML_stuff).

TRUE

> That method is still 
> prevalent in many plugins,

That's why I did it.

> but I'd like to get rid of it as much as 
> possible for several reasons. For one, it makes the plugin generated code
> overly large and hard to read. Second, it makes it harder to ensure the
> output formatting looks consistent across different plugins. Third, if we
> ever change the file format of our output (to ODF, maybe), this will get us
> into trouble.

I will pay attention to it and make the changes accordingly.

> Therefore, when you write 
>
> cat ("<h1>Anderson-Darling Normality Test</h1>\n")
>
> it would be better to use this instead:
>
> rk.header ("Anderson-Darling Normality Test")

I was aware of this functionality but didn't use it since it was easy in the 
other way too. But with your previous explanation is this of course not 
sufficient. I'll do it the way you described in future.

>
> We don't have a similar means to output results, esp. tables, yet, but I
> think the time has come to create such a function. Something like:
>
> rk.results <- function (vector_of_titles, ...)
>
> I'll try to come up with something, soon. Just wanted to let you know,
> already.

I guess it will be a matter of some weeks, therefore I 'll slow down 
my "developmental work" and concentrate on fixing existing plug-ins until you 
have a solution.

>
> Regards
> Thomas
>
> Happy new Year to all!

Regards
Stefan




More information about the Rkward-devel mailing list