[rkward-devel] Downloadable plugins

meik michalke meik.michalke at uni-duesseldorf.de
Wed Oct 6 21:51:29 UTC 2010


hi,

am Mittwoch 06 Oktober 2010 (19:29) schrieb Thomas Friedrichsmeier:
> Yes, this looks like a very nice way of creating documentation, indeed. But
> in fact, we should not bring that dependency into the release (otherwise,
> the rkwardtests-package will not even install, unless the user already has
> roxygen installed).

i thought so as well. therefore right now, the package doesn't replace 
anything, the whole test framework is left untouched (i guess?). i just wanted 
to add it to SVN already to have comments on the direction as soon as 
possible.

> What exactly do you need to do in order to generate the .Rd pages? Perhaps
> we could come up with a nifty script that adds the roxygen-dependency,
> generates the man pages, and removes the roxygen-dependency, again. We
> could then add that to scripts/makedist.sh.

in short, roxygen works like this: create the documentation in the comment 
style you see (that is comments start with "#' " and there are some 
@keywords), load the roxygen package and call the roxygenize() function on the 
whole package folder. that will translate those special comments to 
documentation. practically, you don't need roxygen from this point on, the doc 
files are in place and ready to be packaged, so once the documentation is up 
to date, the dependency can be dropped until an update is needed.

to solve this issue, i think a script wouldn't have to do much: comment out 
the roxygen() function at the end of rkwardtests-package.R and remove the 
dependecy note in DESCRIPTION and rkwardtests-package.Rd. as far as i see it, 
only this one function makes the R package creation stop with an error if 
roxygen can't be loaded; everything else in the R files is interpreted as 
ordinary comments. this one roxygen() call is needed during doc creation 
because roxygen would ignore the comment-only package file completely 
otherwise. [TODO: check wheter this is still true, because roxygen is in vivid 
development, and this drawback might have been solved already.]

to begin with, here's a short R function i'm actually using, and a bash script 
it is calling after doc creation to do packaging, installation, and the like:
 o http://reaktanz.de/stuff/R/roxy.rkwardtests.R
 o http://reaktanz.de/stuff/R/pack_rkwardtests.sh
that is, if the paths are set correctly, after changing something in the R 
code and/or documentation comments, a simple call of roxy.rkwardtests() will 
create the .Rd files and a new R package, install that locally, make a PDF 
file and copy it all to a local repository folder (which could as is be used 
as a real R repository if reachable via internet). treat it as you wish ;-)

> Some wishlist items:
> - Add an "append"-parameter to rktest.makeplugintests(), to make it append
> to an existing outfile (FALSE by default)
> - Add an optional parameter to run only the specified tests (given by their
> id) of a suite (would also have to be added to rktest.runRKTestSuite(), of
> course). This would often come in handy during test development.

ok, once it basically runs i'll see to it that these options will be added.


viele grüße :: m.eik

-- 
dipl. psych. meik michalke
institut f"ur experimentelle psychologie
abt. f"ur diagnostik und differentielle psychologie
heinrich-heine-universit"at 40225 d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20101006/822aee6a/attachment.sig>


More information about the Rkward-devel mailing list