is_draft | R Documentation |
Return value of YAML directive "draft:"
is_draft()
For use in Rmarkdown documents. Return value of YAML directive "draft:", either true
or false
.
Will return FALSE if "draft:" directive does not exist in rmarkdown file.
Will return FALSE if value of "draft:" directive is not a logical value (true or false).
Logical value: TRUE or FALSE.
Dave Braze davebraze@gmail.com
metadata
## May be used to conditionally watermark ggplots library(ggplot2) data(iris) tmp <- ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width, color=Species)) + geom_point() if (is_draft()) {watermark(tmp)} else {tmp} ## If called from within YAML block use FDBpub::is_draft(). FDBpub::is_draft()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.