Skip to content

Instantly share code, notes, and snippets.

@lcolladotor
Created February 20, 2014 03:12
Show Gist options
  • Save lcolladotor/9106456 to your computer and use it in GitHub Desktop.
Save lcolladotor/9106456 to your computer and use it in GitHub Desktop.
R Markdown test
===============
# Title 1
## Title 2
### Title 3
#### Title 4
Headings work.
* hola
* hello
List works.
`helloooooo`
Raw inline markup works.
```{r}
## Fenced R code chunks work
print("hello")
```
```{r echo=FALSE}
## Even when using knitr options
library("devtools")
```
```bash
## Other languages work too, note that knitr has several engines implemented too http://yihui.name/knitr/demo/engines/
$ echo "$hola"
```
# Problematic part: inline R code
Ok, raw inline works:
`devtools`
`Rword just to check starting with R|r`
Problems start here. First one is not recognized, but then the regex works after that and the `adfs` uses the r source scope.
`r print("devtools")`adfs
asdf
`r print("devtools")`
`hello`
`r print("test1")` print("test2") the first print should be R marked-up while the second one should not.
`hola`
`R print(paste("Hola", 0)) ` asd
`Rhola`
Hm... it just doesn't stop. I could either get the regex to simply not regnize the inline R code or to recognize it, but then never stop.
Hola
1. hola
2. hello
```{r eval=FALSE}
## derfinder itself
library(devtools)
install_github("derfinder", "lcolladotor")
```
```r
print("hola")
```
[hola](sadfasdf)
Never stopped...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment