Skip to content

[R-pkg-devel] Starter Help

3 messages · ivo welch, Stefan McKinnon Høj-Edwards, Dr Gregory Jefferis

#
Apologies for the Intrusion.  I am trying to learn package development with
roxygen.  The ecosystem has been moving so fast that much of what I learned
by googling and reading on the web (including old posts) seems to be at
least mildly outdated.

* does the r-package-devel mailing list have a search engine?  (or generic
google?)  a FAQ?

* could someone please point me to a good current example that follows
appropriate style and other guidelines, using the '@' roxygen documentation
format?  (The '@' example In Hadley's book does not include a @name, which
my `document()`  does not like.)

I also have a few specific questions, but I may be able to figure it out
given the above.

* is it possible to import a set of *.Rd man documentation files into my R
session?

* is it still good practice to place my functions into their own
environments (aka `me$myfun <- cmpfun(function() message("my fun")`).  I am
thinking that this complicates matters unnecessarily in a package, given
that packages have namespaces, and environment prefixes makes documentation
access more complex (not ?me$myfun but ?'me$myfun' now).  and should I lose
the `cmpfun` in a package?

basic pointers appreciated.

/iaw
#
Hi Iaw,

Hadley's book is generally a good starting point. For an overview of the
roxygen2, I have a summary on http://www.iysik.com/r/roxygen2, which is but
a small addition to the current sphere of knowledge.

Re. your questions:
R session?
It is not clear what you are trying here. Rd documentation is not code
(except the examples), so importing it into an R session seems to me
nonsense. If you want to import existing Rd documention into a roxygen2
documentation, you will have to copy-paste the text and give it the
necessary tags.
environments
Yes, this complicates everything. Stop doing it.

I do not have answers to your other questions.

/Stefan


Den man. 18. feb. 2019 kl. 02.02 skrev ivo welch <ivo.welch at gmail.com>:

  
  
#
On 18 Feb 2019, at 8:13, Stefan McKinnon H?j-Edwards wrote:

            
This may be what you want:

https://cran.r-project.org/web/packages/Rd2roxygen/index.html

Although my experience a while back was that some manual work was still 
required.

Best wishes,

Greg.

--
Gregory Jefferis, PhD
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK

http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://jefferislab.org
http://flybrain.stanford.edu