# 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

# install.packages("devtools")
devtools::install_github("D-iii-S/d3srutils")
library("d3s")

Function Overview

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



D-iii-S/d3srutils documentation built on March 3, 2021, 9:11 a.m.