(Cross-posted from a response I just left on R-help:)
As a workaround, you could include your own xvignette
function in your package: see below.
It won't show you indices, but it will pick up any appropriately named file that you include in the inst/doc
directory of your
package ...
xvignette <- function(vname,pkg,ext="pdf") {
vname <- paste(vname,ext,sep=".")
fn <- system.file("doc",vname,package=pkg)
if (nchar(fn)==0) stop("file not found")
utils:::print.vignette(list(pdf=fn))
invisible(fn)
}
You'll have to somehow alert your package users to the fact that this alternative documentation exists -- perhaps in the help file for the package itself.
You might fill in the default value of pkg
above with your package name to make it easier on the user: I thought about using some variant of getPackageName(environment(xvignette))
to do it automatically, but that seems too complicated ...
Brian Ripley also mentioned in his response to the question that:
At present vignette() means Sweave documents, as only they have
metadata like titles. This is planned to be changed soon.
... but I don't know what "soon" means (it will be about 6 months until 2.14.0 comes out, I think)
edit: http://article.gmane.org/gmane.comp.lang.r.devel/28449 details another workaround (creating a dummy vignette that incorporates the existing PDF file)
edit 2: And
?vignette
says thatCurrently, only PDF versions of vignettes can be viewed.
Everything else is there for the user to find on his or her own. In that case,browseVignettes
may be of help. – Matthaus