Publications by Michael Kuhn
New R package: a dictionary with arbitrary keys and values
Coming from Python, the absence of a real dictionary in R has annoyed me for quite some time. Now, I actually needed to use vectors as keys in R:> library(dict)> d ->> d[[1]] > d[[c(2, 3)]] > d[[“foo”]] > d[[1]][1] 42> d[[c(2, 3)]][1] “Hello!”Under the hood, separate C++ dictionaries (unordered_map) are created for the differe...
964 sym
Display element ids for debugging Shiny apps
My current Shiny project contains at least five tables and I constantly forget how they are called. So I whipped up a little bookmarklet that uses jQuery to show the id of each div and input. Some of those can be ignored as they are internal names set by Shiny, but most are the actual names you define in R.Drag this link to your bookm...
864 sym 2 img
Display element ids for debugging Shiny apps
My current Shiny project contains at least five tables and I constantly forget how they are called. So I whipped up a little bookmarklet that uses jQuery to show the id of each div and input. Some of those can be ignored as they are internal names set by Shiny, but most are the actual names you define in R.Drag this link to your bookm...
864 sym 2 img
My knitr LaTeX template: manuscript and supplement interleaved in one source file
Most of the time between starting manuscript and having it accepted after peer-review is spent writing, re-writing and re-arranging content. In Word, keeping track of figure numbers is a big pain, even more so when figures are moved between the main manuscript and the supplement. Moving my Word manuscript to knitr, I first had to deci...
1714 sym
My knitr LaTeX template: manuscript and supplement interleaved in one source file
Most of the time between starting manuscript and having it accepted after peer-review is spent writing, re-writing and re-arranging content. In Word, keeping track of figure numbers is a big pain, even more so when figures are moved between the main manuscript and the supplement. Moving my Word manuscript to knitr, I first had to deci...
1714 sym