Skip to content

Instantly share code, notes, and snippets.

@mattblackwell
mattblackwell / beamer-overlay.Rmd
Last active April 14, 2024 20:53
How to create quick and dirty beamer animations with rmarkdown and knitr
---
title: 'Beamer Overlay Test'
output:
beamer_presentation:
incremental: true
theme: CambridgeUS
---
```{r, echo = FALSE}
@mrdwab
mrdwab / cSplit.R
Last active March 14, 2023 05:03
The faster version of `concat.split` that makes use of `data.table` efficiency.
cSplit <- function(indt, splitCols, sep = ",", direction = "wide",
makeEqual = NULL, fixed = TRUE, drop = TRUE,
stripWhite = FALSE) {
message("`cSplit` is now part of the 'splitstackshape' package (V1.4.0)")
## requires data.table >= 1.8.11
require(data.table)
if (!is.data.table(indt)) setDT(indt)
if (is.numeric(splitCols)) splitCols <- names(indt)[splitCols]
if (any(!vapply(indt[, splitCols, with = FALSE],
is.character, logical(1L)))) {