Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

package - R create reference manual with R CMD check

I am writing an R package and would like to make a pdf reference manual of all functions in the package. I understood from here that R CMD check automatically creates a reference manual.

Here I read that a manual entry is created "of the functions you listed in the export section of NAMESPACE".

My NAMESPACE file looks as follows:

# Export all names
exportPattern(".")

# Import all packages listed as Imports or Depends
import(
  LIM
)

so I thought everything will be exported. During R CMD check on the package directory, at the very end it says:

 * checking PDF version of manual ... OK

However, I do not find a reference manual in my package directory (I would assume it would be in inst/doc). What am I missing here?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Another way is to create the reference manual directly using:

R CMD Rd2pdf mypackage

where mypackage is the folder containing your R package code folder structure including the man folder with your .Rd files.

For some reason I never get the reference manual during build or check in RStudio, maybe because I've missed a setting somewhere. But running the command like this works fine as well.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...