Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Package Documentation with RStudio?

Tags:

package

r

I managed to create a package using RStudio and roxygen2. The whole package-creating process worked without any errors and warnings. Anyway, my question is how do I create a PDF documentation of my package and its functions? Thanks in advance.

like image 925
Nussig Avatar asked Nov 29 '14 21:11

Nussig


People also ask

How do you get documentation of an installed and loaded R package?

Once installed, you can get a list of all the functions in the package. If the package is on CRAN, you will find documentation in PDF format of all functions inside a page like https://cran.r-project.org/web/packages/package_name . Recall you can access this documentation in HTML format with the help function.

How do I get the document function in R?

help operator in R provide access to the documentation pages for R functions, data sets, and other objects, both for packages in the standard R distribution and for contributed packages. To access documentation for the standard lm (linear model) function, for example, enter the command help(lm) or help("lm") , or ?

What are R packages written in?

The official R software environment is an open-source free software environment within the GNU package, available under the GNU General Public License. It is written primarily in C, Fortran, and R itself (partially self-hosting). Precompiled executables are provided for various operating systems.


1 Answers

You mean the pdf manual? I don't think there's a handy devtools function for that (but I could be wrong). Try running system('R CMD Rd2pdf /path/to/mypackage').

You'll need a working LaTeX distribution to make pdfs. See also this discussion on stackoverflow.

like image 79
Zach Avatar answered Nov 03 '22 01:11

Zach