Bjørn-Helge Mevik
2003-Jan-07 16:03 UTC
[R] Generating .R and .Rd files with Sweave/noweb?
I'm writing a couple of related functions, and I'd like to generate a (single) .R file (containing the function definitions), and separate .Rd files (documenting each function). Would this be possible with Sweave/noewb? Has anyone tried something along this idea? -- Regards, Bj?rn-Helge Mevik
>>>>> "bj?rn-helge" == Bj?rn-Helge Mevik <bhx2 at mevik.net> writes:bj?rn-helge> I'm writing a couple of related functions, and I'd like to generate a bj?rn-helge> (single) .R file (containing the function definitions), and separate .Rd bj?rn-helge> files (documenting each function). bj?rn-helge> Would this be possible with Sweave/noewb? Has anyone tried something bj?rn-helge> along this idea? Yes, but it isn't as automated as one might want. Doug Bates suggested a possibly better format/processing system recently to me (which might be alternatively useful as a post-noweb/sweave processor, instead of on its own): doxygen, which uses javadoc-style comments, and whose resulting documentation COULD be converted to *.Rd style results. best, -tony -- A.J. Rossini Rsrch. Asst. Prof. of Biostatistics U. of Washington Biostatistics rossini at u.washington.edu FHCRC/SCHARP/HIV Vaccine Trials Net rossini at scharp.org -------------- http://software.biostat.washington.edu/ ---------------- FHCRC: M: 206-667-7025 (fax=4812)|Voicemail is pretty sketchy/use Email UW: Th: 206-543-1044 (fax=3286)|Change last 4 digits of phone to FAX (my tuesday/wednesday/friday locations are completely unpredictable.)
Bjørn-Helge Mevik
2003-Jan-09 10:06 UTC
[R] Generating .R and .Rd files with Sweave/noweb?
Paul You're right. My primary goal was to write all the code and documentation in one file, and split this into one .R file and multiple .Rd files. I got the idea of using Sweave/noweb because I'm using Emacs with ESS, and I'd like to be in R-mode when I'm in a code part of the file, and in Rd-mode in a documentation part. I guess using two files and a shell script, as you do, might be the best solution. -- Bj?rn-Helge Mevik