NESCent / r-popgen-hackathon

Population Genetics Hackathon, to be held at NESCent on March 16-20, 2015
18 stars 2 forks source link

Creating README.md which includes a vignette #18

Open thibautjombart opened 9 years ago

thibautjombart commented 9 years ago

Hey guys, you may remember me enquiring about this. Basically, we want the README.md to contain some doc, ideally a vignette. I wasn't sure how to do it. Apparently, there is currently no native support on github for the equivalent of the C:

#include "myFile"

I came up with a workaround which is:

  1. Have a regular markdown vignette in the package structure, in vignettes/
  2. Use a README.Rmd which will recompile the vignette and include its md output into itself
  3. Generate README.md from README.Rmd using knit("README.Rmd")

Example for the apex package: https://github.com/thibautjombart/apex

Easy to extend to any other package. It does require knitr to be the vignette engine though.