[Rd] vignette index

Duncan Murdoch murdoch.duncan at gmail.com
Fri Mar 4 23:42:35 CET 2016


On 04/03/2016 11:18 AM, Wang, Zhu wrote:
> 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?

You have the source code, and can figure it out as well as I can.

Duncan Murdoch

>
> 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:3}}



More information about the R-devel mailing list