Created
August 5, 2015 22:44
-
-
Save joaovissoci/0c0c67e5c7db3c319305 to your computer and use it in GitHub Desktop.
rmarkdown_codes.Rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{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