-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
51 lines (38 loc) · 1.11 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
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
44
45
46
47
48
49
50
51
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo=FALSE, message=FALSE}
# Load the libraries for later use
library(tools)
library(knitr)
```
# D3S R Utils
Collection of various simple functions that we copy over and over again.
## Installation
```r
# install.packages("devtools")
devtools::install_github("D-iii-S/d3srutils")
library("d3s")
```
## Function Overview
```{r, echo=FALSE, message=FALSE, results='asis', collapse=TRUE}
get.by.tag <- function(rd, tag) {
tags <- tools:::RdTags(rd)
rd[[which(tags == tag)]][[1]][1]
}
overview.names <- c()
overview.descr <- c()
for (filename in list.files("man", full.names=T)) {
rd <- parse_Rd(filename)
overview.names <- c(overview.names, get.by.tag(rd, "\\name"))
overview.descr <- c(overview.descr, get.by.tag(rd, "\\title"))
}
kable(data.frame(
Function=unlist(lapply(overview.names, FUN=function(x) { sprintf("`%s`", x) })),
Description=overview.descr
))
```
## Development
* Run `./bin/make.R` before commit to ensure that `README.md` is up-to-date
and the code is well-formatted.