programming

mustashe

A system for stashing and loading the results of long running computations.

'mustashe' Explained

The purpose of the ‘mustashe’ R package is to save objects that result from some computation, then load the object from file the next time the computation is performed. In other words, the first time a chunk of code is evaluated, the output can be stashed for the next time the code chunk is run. This post explains how ‘mustashe’ works. See the previous post for an introduction to the package.

'mustashe'

The purpose of the ‘mustashe’ R package is to save objects that result from some computation, then load the object from file the next time the computation is performed. In other words, the first time a chunk of code is evaluated, the output can be stashed for the next time the code chunk is run. ‘mustashe’ can be installed from CRAN or from GitHub. install.packages("mustashe") # install.packages("devtools") devtools::install_github("jhrcook/mustashe") Check out the next post the see how ‘mustashe’ works under-the-hood.

OncoTree Tidygraph

Introduction Cancers are often first classified by their tissue of origin, but there are several types of cancer for each tissue. Further, each of these can have several subdivisions. For example, head and neck cancers can be further divided into seven cancers, including head and neck squamous cell carcinoma (HNSC). HNSC itself has six subtypes, too. This hierarchy can be represented in a directed acyclic graph (DAG), as shown below.

GitHub Actions for Compiling and Converting LaTeX

Introduction I am preparing a manuscript for submission to a scientific journal and decided to compose it in $\LaTeX$ using Overleaf. While Overleaf, an online $\LaTeX$ editor, has many collaboration features (including live, multi-person editing and review) many people, namely my PI, dislikes both $\LaTeX$ nor Overleaf, and instead prefers MS Word documents. One of Overleafs great feautres is the ability to use GitHub for version control. Therefore, I set up a GitHub Action workflow to test the compilation of the LaTeX document and convert it to docx Word format.

Setting axes to integer values in 'ggplot2'

The problem I stumbled across this problem as a TA for an introductory R course. It was a minor question on a Problem Set focussed on creating a Shiny app that the instructor had seeminly dismissed as trivial and not bothered to include in his solution guide. Anyways, I needed to be able to grade the problem set, so I gave it a shot. Like any good programmer, I Googled the question and clicked on the most appealing Stack Overflow response.

Germination Tracker iOS App

A simple app to help me record data on my seedlings.

Rmarkdown animated GitHub corner

How to add an animated GitHub corner to an Rmarkdown page

Find the intersection of overlapping histograms in R

How to find the point where two histograms overlap.

Photo Zoom Animator in iOS

This was an experimental iOS app explaining how to make a custom interactive transition (to use in my PlantTracker app). The goal was to replicate the transition used in the native phone app. I did my best to document the process here. Final Result Resources I used the SnapKit library to make the contraints on my views. This GitHub repository (and my fork) and its paired Medium article were used as a guide.