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
#!/usr/bin/env Rscript | |
f <- list.files("R/", full.name = TRUE) # run from package source, or adjust path | |
d <- lapply(setNames(f, sub("//", "/", f)), function(x) | |
{ | |
x <- readLines(x) | |
names(x) <- seq_along(x) # tag line number | |
x <- sub("#.*", "", x) # delete comments | |
x <- sub("^[\ \t]*", "", x) # delete leading whitespace | |
x <- x[grepl("function", x)] # get function definitions |
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
library(knitr) | |
library(markdown) | |
dir <- "." | |
# knit R markdown to markdown | |
files <- list.files(dir, "\\.rmd") | |
for (f in files) | |
knit(f, sub("\\.rmd$", ".md", f), envir = new.env()) | |
# generate html versions |
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
Function FormatCrossReferences (cStyle As String) As Integer | |
'field reference and counter | |
r = "com.sun.star.text.TextField.GetReference" | |
n = 0 | |
'enumerator for paragraph and section | |
Dim oParEnum | |
Dim oSecEnum | |
'current paragraph and section | |
Dim oPar | |
Dim oParSection |
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
#!/bin/bash | |
OFS=$IFS # store field separator | |
IFS="${2: }" # define field separator | |
file=$1 # input file name | |
unset a # reference to line array | |
unset i j # index | |
unset m n # dimension |