Skip to content

Instantly share code, notes, and snippets.

View richierocks's full-sized avatar

Richie Cotton richierocks

View GitHub Profile
@richierocks
richierocks / generate-namespace.R
Created December 8, 2015 11:26
Generate R pkg NAMESPACE from roxygen tags, to avoid issue r-lib/roxygen2#372
# Workaround for roxygen2 issue. See:
# https://github.com/klutometis/roxygen/issues/372
# https://stat.ethz.ch/pipermail/r-package-devel/2015q3/000456.html
library(magrittr)
library(stringi)
library(assertive.properties)
library(assertive.code)
r_files <- dir("R", full.names = TRUE)
# Making the colon operator work with characters
# A response to https://twitter.com/carroll_jono/status/1162932405516193793
# This is a stupid implementation, since it will hurt performance of any other usage of :
# Better to do it in C or C++
# Make : into an S3 generic
`:` <- function(x, y, ...) {
UseMethod(":")
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.