Some documentation not appearing in CRAN PDF
ramhiser opened this issue · comments
Dario Strbenac wrote:
I installed the newest version of sparsediscrim, but in the reference manual on the CRAN website, http://cran.r-project.org/web/packages/sparsediscrim/sparsediscrim.pdf there's no documented function dlda. But in R, if I do ?dlda it is documented. I thought I'd point it out in case it confuses other users.
I confirmed that this is the case for versions 0.1 and 0.2 on CRAN.
My guess is that this is related to exporting S3 generics. Check the devtools
and roxygen2
docs.
Based on Hadley's SO answer, I updated the Roxygen
directives.
Afterwards, I ran:
document('.', clean=TRUE)
install()
Although ?mdeb
functions correctly, mdeb
is still not showing up in package's help index. Same for other classifiers.
!> sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-apple-darwin12.5.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sparsediscrim_0.2 roxygen2_3.1.0 devtools_1.4.1
loaded via a namespace (and not attached):
[1] bdsmatrix_1.3-1 brew_1.0-6 codetools_0.2-8 compiler_3.0.3
[5] corpcor_1.6.6 digest_0.6.4 evaluate_0.5.3 httr_0.3
[9] memoise_0.1 mvtnorm_0.9-9997 parallel_3.0.3 Rcpp_0.11.1
[13] RCurl_1.95-4.1 stringr_0.6.2 tools_3.0.3 whisker_0.3-2
Relevant packages:
roxygen2
: version 3.1.0devtools
: version 1.4.1
Discovered the problem:
You use @keyword internal
on one of the methods that ends up belonging to the same .Rd
file, e.g. print.mdeb
has
#' Outputs the summary for a MDEB classifier object.
#'
#' Summarizes the trained mdeb classifier in a nice manner.
#'
#' @keywords internal
#' @param x object to print
#' @param ... unused
#' @rdname mdeb
#' @export
But then, the mdeb.Rd
file generated has the \keyword{internal}
bit added, and everything in there gets set as internal, so nothing mdeb
-related gets indexed.
@hadley, this behaviour is a bit surprising -- should the rd
vignette be updated to state that keywords apply to the .Rd
file, not the function?
Or is there some smarter way roxygen2
could handle this?
Thanks for helping, @kevinushey. Damn copy/pasta error. Never noticed it.
@kevinushey all roxygen tags apply to a file, not a function :/