Skip to content

Instantly share code, notes, and snippets.

@gdbassett
Created November 3, 2016 23:01
Show Gist options
  • Save gdbassett/2a97ff50db016e767d49010124df960e to your computer and use it in GitHub Desktop.
Save gdbassett/2a97ff50db016e767d49010124df960e to your computer and use it in GitHub Desktop.
---
title: "Test"
author: "Gabe"
date: "November 03, 2016"
output: html_document
params:
df: data.frame()
a: ""
b: ""
c: "FALSE"
d: ""
e: ""
f: ""
g: ""
h: ""
i: ""
---
```{r setup, cache=FALSE, include=FALSE}
t <- ifelse(tolower(params$c) == "true", TRUE, FALSE)
e <- params$e
knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE,
results="markdown", prompt=FALSE, error=FALSE,
fig.width=8, fig.height=5, cache=FALSE, output.format='html', eval=TRUE)
```
```{r "load packages", warning=TRUE, echo=TRUE, message=TRUE, error=TRUE}
# foo
```
```{r eval=t}
print("Hello World")
```
```{r eval=(t & (e != ""))}
print("Hello World 2")
```
```{r eval=(t & (e == ""))}
print("Hello World 2")
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment