How to alias functions in building R package

时间:2016-02-12 20:02:07

标签: r devtools

In packageName/man I want ?foo and ?bar to point to same documentation for these related functions.

Is it enough to, in foo.Rd:

\name{foo}
\alias{foo}
\alias{bar}

And then should I get rid of bar.Rd? Or do I also have to put, in bar.Rd,

\name{bar}
\alias{bar}
\alias{foo}

And then how would help() know which documentation to use?

I started with package.skeleton(code_files=...), which created many .Rd files that aren't necessary. If I leave them in install() errors because they have empty titles. I want to make sure that it is ok to delete many of them them and use \alias{} to group them into a few documents that I can spend a bit of time on.

0 个答案:

没有答案