Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdded Rcpp compilation to vignette build. #33
Merged
Conversation
vignettes/rcppannoy.Rmd
Outdated
| @@ -10,6 +10,13 @@ vignette: > | |||
| %\usepackage[utf8]{inputenc} | |||
| --- | |||
|
|
|||
| ```{r, echo=FALSE, results="hide"} | |||
| knitr::opts_chunk$set(error=FALSE, warning=FALSE, message=FALSE) | |||
eddelbuettel
Oct 9, 2018
Owner
You could set eval=FALSE globally too.
Brooke Anderson and I used that super-cleverly in the R Journal paper on using drat for a data archive -- if the optional data is not there, the knitr chunks with not evaluate. After some pretest for a package we essentially do
# Code to add at the beginning of the vignette(s) of the code package to ensure vignette
# code is conditioned to only run if the data package is available
hasData <- requireNamespace("hurricaneexposuredata", quietly = TRUE) #1
if (!hasData) { #2
knitr::opts_chunk$set(eval = FALSE) #3
msg <- paste("Note: Examples in this vignette require that the",
"`hurricaneexposuredata` package be installed. The system",
"currently running this vignette does not have that package",
"installed, so code examples will not be evaluated.")
msg <- paste(strwrap(msg), collapse="\n")
message(msg) #4
}
I think we discuss the trick in the paper too -- the hashmarks one to four here are references.
You could set eval=FALSE globally too.
Brooke Anderson and I used that super-cleverly in the R Journal paper on using drat for a data archive -- if the optional data is not there, the knitr chunks with not evaluate. After some pretest for a package we essentially do
# Code to add at the beginning of the vignette(s) of the code package to ensure vignette
# code is conditioned to only run if the data package is available
hasData <- requireNamespace("hurricaneexposuredata", quietly = TRUE) #1
if (!hasData) { #2
knitr::opts_chunk$set(eval = FALSE) #3
msg <- paste("Note: Examples in this vignette require that the",
"`hurricaneexposuredata` package be installed. The system",
"currently running this vignette does not have that package",
"installed, so code examples will not be evaluated.")
msg <- paste(strwrap(msg), collapse="\n")
message(msg) #4
}
I think we discuss the trick in the paper too -- the hashmarks one to four here are references.
LTLA
Oct 9, 2018
Author
Contributor
Yeah, that's probably neater than having to set eval=FALSE manually.
Yeah, that's probably neater than having to set eval=FALSE manually.
8310d3a
into
eddelbuettel:master
1 check passed
1 check passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.