Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vignette code chunks not evaluating in pkgdown build #32

Closed
hrecht opened this issue Mar 25, 2018 · 3 comments
Closed

Vignette code chunks not evaluating in pkgdown build #32

hrecht opened this issue Mar 25, 2018 · 3 comments

Comments

@hrecht
Copy link
Owner

hrecht commented Mar 25, 2018

Examples in the Getting Started vignette that require an API key are not run on CRAN, using the NOT_CRAN convention established in other documentation.


{r, echo = FALSE}
NOT_CRAN <- identical(tolower(Sys.getenv("NOT_CRAN")), "true")
knitr::opts_chunk$set(purl = NOT_CRAN)

For example, this code chunk does not evaluate in the pkgdown documentation build:


{r, purl = NOT_CRAN, eval = NOT_CRAN}
getCensus(name = "timeseries/healthins/sahie",
	vars = c("NAME", "IPRCAT", "IPR_DESC", "PCTUI_PT"), 
	region = "us:*", time = 2015)

This is currently leading to the pkdown build of the vignette not showing results. When compiled locally with knitr, these code chunks do evaluate as intended.

@jayhesselberth
Copy link

It looks like the googlesheets vignette also sets eval = NOT_CRAN in knitr::opts_chunk; your vignette does not.

https://github.com/jennybc/googlesheets/blob/master/vignettes/managing-auth-tokens.Rmd

Does that help?

@hrecht
Copy link
Owner Author

hrecht commented Mar 29, 2018

Thanks! I'll try this

@hrecht hrecht closed this as completed in 956febf Mar 30, 2018
@hrecht
Copy link
Owner Author

hrecht commented Mar 30, 2018

This fix and setting NOT_CRAN in my .Renviron worked, thanks @jayhesselberth !

jhollway added a commit to globalgov/manydata that referenced this issue Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants