Skip to content

Instantly share code, notes, and snippets.

@joaovissoci
Created August 5, 2015 22:44
Show Gist options
  • Save joaovissoci/0c0c67e5c7db3c319305 to your computer and use it in GitHub Desktop.
Save joaovissoci/0c0c67e5c7db3c319305 to your computer and use it in GitHub Desktop.
rmarkdown_codes.Rmd
```{r}
summary(cars$dist)
summary(cars$speed)
```
```{r, echo=FALSE}
summary(cars)
```
```{r, eval=FALSE}
summary(cars)
```
```{r, results='asis'}
knitr::kable(mtcars)
```
```{r setup, include=FALSE}
knitr::opts_chunk$set(cache=TRUE)
```
```{r engine='Rcpp'}
#include <Rcpp.h>
// [[Rcpp::export]]
int fibonacci(const int x) {
if (x == 0 || x == 1) return(x);
return (fibonacci(x - 1)) + fibonacci(x - 2);
}
```
```{r}
fibonacci(10L)
fibonacci(20L)
```
rmarkdown::render("/home/joao/Desktop/renan.Rmd")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment