简体   繁体   中英

Link vignette to package

I created a package with rStudio not with devtools. Now i want to create a vignette and link it to the package so that i can search for the package in the library and should find a link for the vignette under the description file . I created a rmarkdown document in the same project as the package. I have the following settings but i dont get the link in the package for the vignette. Which setting should i include to produce the vignette?

---
title: "Das Paket PoissonRegression"
author:
- name
abstract: 
         \noindent
          some text

fontsize: 11
graphics: true
lof: true
documentclass: article
vignette: >
 % \VignetteIndexEntry{myVignette}
 % \VignetteEngine{knitr::knitr}
 \usepackage[]{graphicx}
output: 
  pdf_document:
    fig_caption: yes
    toc: true
    latex_engine: pdflatex
    toc_depth: 2
    number_sections: true
    keep_tex: true

I think that you need to enter the following in your DESCRIPTION file:

VignetteBuilder: knitr
Suggests:
    knitr,rmarkdown

Also, I am not sure whether this matters, but I use

%\VignetteEngine{knitr::rmarkdown}

Finally, the vignette file should be in the directory "vignettes" in your package directory. So if your package directory is "PoissonRegression/", then there should be a directory "PoissonRegression/vignettes/" where your vignette resides.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM