On Thursday 11 August 2011, meik michalke wrote:
> > You mention producing this info by a script, and I think it would really
> > be a good idea to have something roughly equivalent to
> > package.skeleton() for rkward plugins, indeed.
> 
> yes, that was exactly where i was going. it would also be nice to have a
> simple dialog for that, where you could type in some basic info.

True. And that dialog itself could be implemented as a plugin, I think.
 
> > However, I think producing this in XML format is not really _that_ much
> > harder to implement.
> 
> let's say: it's absolutely possible. but it can't get much easier than
> giving a data.frame to a function of R-base, and read it back the same
> way, i guess.
> 
> [i used some stuff from the XML package in one of my packages, which worked
> great, but i had to throw it out again after there was no windows binary
> available for some time, as it turned out after i received support
> inquiries from people who couldn't update my package (it was a limited
> thing, i wrote my own parser then to get rid of the dependency again). is
> there any XML support in the base installation? if not, we'd have to write
> it ourselves, if we need it, e.g. to create a package skeleton.]

For this particular purpose, I would not look for any "real" XML support, but 
simply paste text. I.e. along the lines of:

writeAttributes <- function (attribs) {
        output <- ""
        for (i in 1:length (attribs)) {
                output <- paste (output, " ", names(attribs)[i], "=", dQuote 
(atttribs[i]), sep="")
        }
        output
}

writeAbout <- function (name, version, authors, [...]) {
        output <- ""
        output <- paste (output, "<about", writeAttributes (c (name=name, 
version=version, [...])), sep="")
        for (author in authors) {
                output <- paste (output, "<author", writeAttributes (author), 
"/>\n", sep="")
        }
        [...]
        output <- paste (ouput, "/>\n", sep="")
        output
}

writeAbout (name="Square the circle", version="0.1", authors=list (
        c (name="John Doe", email="..."), 
        c (name="...")
        ), [...])

etc.

Regards
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel

Reply via email to