Since gtools is very lightweight and already widely used, it seems like it would be a useful place to put small/lightweight utilities that are not already available in a lightweight package (i.e., they're either in a heavy package [lots of dependencies, compiled code ...] or only in blog posts etc.).
- logspace addition/subtraction/summation etc. (in
hmmTMB, matrixStats, also in base R C code and R.h as logspace_(add|sub|sum)
- self-naming lists?
lme4::namedList, tibble::lst()
- array-melting (from
reshape2::melt) is as.data.frame.table(x) so not necessary, but maybe a convenience/mnemonic wrapper (and an option to rename the value column)?
Since
gtoolsis very lightweight and already widely used, it seems like it would be a useful place to put small/lightweight utilities that are not already available in a lightweight package (i.e., they're either in a heavy package [lots of dependencies, compiled code ...] or only in blog posts etc.).hmmTMB,matrixStats, also in base R C code and R.h aslogspace_(add|sub|sum)lme4::namedList,tibble::lst()reshape2::melt) isas.data.frame.table(x)so not necessary, but maybe a convenience/mnemonic wrapper (and an option to rename the value column)?