G'day Erin, On Sat, 16 Dec 2017 08:00:38 -0600 Erin Hodgess <erinm.hodg...@gmail.com> wrote:
> I'm in the process of writing a package, and I'm using the lovely "R > Package" book as a guideline. > > However, in the midst of my work, I discovered that I had omitted a > function and am now putting in it the package. Not a problem. But > the problem is the help file. What is the best way to generate a > help file "after the fact" like that, please? It depends on how you decided to write the documentation. If you follow the "R Package" guidelines and use roxygen2, just add the comments for the documentation at the beginning of the file and follow the procedure outline in "R Packages" book. If you are writing the documentation separate, more like the "Writing R Extensions" manual, then (1) start R, (2) source the file in which the function is so that is is in your workspace, (3) say "prompt(foo)" if the function's name is foo and (4) copy the resulting foo.Rd into the /man directory of your package. Cheers, Berwin ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.