README.md 1023 Bytes
Newer Older
Holger Brandl's avatar
Holger Brandl committed
1
2
3
4
5
6
7
8
9
10
rend.R - A shell-wrapper for rmarkdown::render
===


Installation
---

Download a local copy and add it to your path using
```
targetDirectory=~/bin
11
wget -NP $targetDirectory --no-check-certificate https://raw.githubusercontent.com/holgerbrandl/datautils/master/R/rendr/rend.R
Holger Brandl's avatar
Holger Brandl committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
chmod +x $targetDirectory/rend.R
export PATH=$targetDirectory:$PATH
```


Usage
---

To use it from a shell you can call rend.R directly with a script as argument.
```
rend.R MyScript.R
```
or for Rmd
```
rend.R MyScript.Rmd
```

The report will be created in the current working directory. To learn about options just call `rend.R --help`

In case you want to render R snippets you can source a small bash function that wraps rend.R
```
source <(curl https://raw.githubusercontent.com/holgerbrandl/datautils/master/R/rendr/rendr_utils.sh 2>&1 2>/dev/null)
```
Now you can spin R snippets by piping them into `spinsnip`

```
echo "require(ggplot2); ggplot(iris, aes(Sepal.Length, Sepal.Width)) + geom_point()" | rendr_snippet "my_report"
```