Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Using "browseVignettes" obtain error "No vignettes found" #68

Closed
rebjoh opened this issue Nov 21, 2014 · 5 comments
Closed

Using "browseVignettes" obtain error "No vignettes found" #68

rebjoh opened this issue Nov 21, 2014 · 5 comments

Comments

@rebjoh
Copy link

rebjoh commented Nov 21, 2014

I believe this issue is related to "Link to Vignettes" but deserves to be listed as a separate issue.

Upon installing my own version of gameday from github, loading it and trying to view the vignette:

library("devtools")
install_github("rebjoh/gameday")
library("gameday")
browseVignettes(package = "gameday")

I obtained an error:

No vignettes found by browseVignettes("gameday")

Does anyone else face this issue? My package on github includes a vignettes folder, however when I download my package, my local R win-library gameday folder does not contain a vignettes folder. I believe it is related to the issue that by default .gitignore includes inst/doc?

To get around this, I have two work arounds, but I'm not sure which one is best practice:

  1. Force building vignettes upon installation as Hadley suggested:
devtools:install_github(build_vignettes = TRUE)
  1. As Dean alluded to in the previous "Link to Vignettes" issue, remove inst/doc from .gitignore.
@abrarwafa
Copy link

Hello @rebjoh

I had the same problem, I followed Dean's advice and removed inst/doc form .gitigonre.
Now when I try to view the vignette using: vignette("overview", "package_name") it works fine.

Hope this helps!

@spencerfrei
Copy link

I also had the same problem, and it was fixed using the build_vignettes = TRUE option, but this seems very weird.

@jennybc
Copy link
Member

jennybc commented Nov 22, 2014

I'm a bit puzzled by this. When I did my dry run and when I worked up the peer review instructions, I ended up removing my installed version and re-installing from GitHub several times.And I don't recall having vignette issues. But there's always a chance I didn't test rigorously enough? Was I browsing vignettes each time? Maybe not.

I think @spencerfrei 's comment is the main one to heed at this point. If you're having this problem of missing vignette, explicitly specify build_vignettes = TRUE in install_github(). Then the vignette should be rebuilt upon installation, making the .gitignoreing of inst/doc a moot point.

@spencerfrei
Copy link

I am not sure either, because I followed exactly your instructions and the vignettes still wouldn't build. I'll just make sure to mention this in my README so that when people install they don't have this issue.

@BernhardKonrad
Copy link
Member

To summarize the wisdom from above:

When I was grading the assignment I went with build_vignettes=TRUE in install_github() to build a fresh vignette locally as I install the package.

If you want to give the user the option to use your version of the vignette you have to ship it by pushing the files to Github. To do that, you have make sure the inst/doc folder is not in .gitignore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants