[Rd] vignette index

Morgan, Martin Martin.Morgan at roswellpark.org
Fri Mar 4 19:19:20 CET 2016


Within R these are determined by \VignetteIndexEntry{}. I think you are referring to the order on the CRAN landing page for your package https://cran.r-project.org/web/packages/bst/index.html, and then the question is for a CRAN member.

In Rnw

\documentclass{article}

% \VignetteIndexEntry{01-Foo}

\begin{document}
01-Foo
\end{document}

or Rmd as

---
title: "Demo"
author: Ima Scientist <ima at scientist.org>
vignette: >
  % \VignetteIndexEntry{01-Foo}
  % \VignetteEngine{knitr::rmarkdown}
---

________________________________________
From: R-devel <r-devel-bounces at r-project.org> on behalf of Wang, Zhu <Zwang at connecticutchildrens.org>
Sent: Friday, March 4, 2016 11:18 AM
To: Duncan Murdoch; r-devel at r-project.org
Subject: Re: [Rd] vignette index

I think the online order of vignette files are not based on vignette title or filename alphabetically. I am just curious: by what order these vignette files were displayed online so I can make changes accordingly?

Thanks,

Zhu

-----Original Message-----
From: Duncan Murdoch [mailto:murdoch.duncan at gmail.com]
Sent: Friday, March 04, 2016 10:47 AM
To: Wang, Zhu; r-devel at r-project.org
Subject: Re: [Rd] vignette index

On 04/03/2016 9:44 AM, Wang, Zhu wrote:
> Dear helpers,
>
> I have multiple vignette files for a package, and I would like to have the "right" order of these files when displayed online. For instance, see below:
>
> https://cran.r-project.org/web/packages/bst/index.html
>
> The order of vignette links on CRAN is different from what I hoped for:
>
> > vignette(package="bst")
> Vignettes in package 'bst':
>
> pros                    Cancer Classification Using Mass
>                          Spectrometry-based Proteomics Data (source,
>                          pdf)
> static_khan             Classification of Cancer Types Using Gene
>                          Expression Data (Long) (source, pdf)
> khan                    Classification of Cancer Types Using Gene
>                          Expression Data (Short) (source, pdf)
> static_mcl              Classification of UCI Machine Learning Datasets
>                          (Long) (source, pdf)
> mcl                     Classification of UCI Machine Learning Datasets
>                          (Short) (source, pdf)
>
> The package bst already has an index.html,  and I thought that should have done the job, but apparently not. Any suggestions?
>

The index.html file should be used in the online help system, but
vignette() doesn't use that, it looks in the internal database of vignettes.  I don't think you can control the order in which it displays things.

This could conceivably be changed, but not by consulting your index.html file --- it is not required to follow a particular structure, so we can't find what order you want from it.  One more likely possibility would be to sort alphabetically in the current locale according to filename or vignette title.  So then you could get what you want by naming your vignettes 1pros, 2static_khan, etc.

It would also be possible to add a new \VignetteXXXX directive so affect collation order, but that seems like overkill.

Duncan Murdoch

**Connecticut Children's Confidentiality Notice**
This e-mail message, including any attachments, is for =...{{dropped:15}}



More information about the R-devel mailing list