# Articles by Posts | Joshua Cook

### Riddler: Can You Tell When The Snow Started?

May 9, 2020 |

FiveThirtyEight’s Riddler Express ( Link to the original article.) From Patrick Mayor comes a question about something we’re doing these days to keep ourselves and others safe: social distancing. You’re walking along the middle of a wide sidewalk when you see someone walking toward you from the other ...

### Riddler: Can You Flip Your Way To Freedom?

May 2, 2020 |

FiveThirtyEight’s Riddler Express Dakota Jones is back in action. In her quest to locate the Temple of Diametra, she has found another highly symmetric crystal. However, nefarious agents have again gotten wind of her plans, and now Dakota and the crystal are nowhere to be found. And so, you ... [Read more...]

### Riddler: Can You Solve The Chess Mystery?

April 25, 2020 |

Summary The Riddler is a weekly puzzle provided by FiveThirtyEight. This week’s puzzle involves finding the path used by the knight to kill the opposing queen in a game of chess. Below, I show how I solved puzzle using two methods: a siumulation of the chessboard and by building ...

### Caching in R

April 4, 2020 |

Introduction Caching intermediate objects in R can be an efficient way to avoid re-evaluating long-running computations. The general process is always the same: run the chunk of code once, store the output to disk, and load it up the next time the same chunk is run. There are, of course, ... [Read more...]

### Caching in R

April 4, 2020 |

Introduction Caching intermediate objects in R can be an efficient way to avoid re-evaluating long-running computations. The general process is always the same: run the chunk of code once, store the output to disk, and load it up the next time the same chunk is run. There are, of course, ... [Read more...]

### ‘mustashe’ Explained

March 22, 2020 |

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 ... [Read more...]

### ‘mustashe’ Explained

March 22, 2020 |

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 ... [Read more...]

### ‘mustashe’

March 21, 2020 |

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 ... [Read more...]

### ‘mustashe’

March 21, 2020 |

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 ... [Read more...]

### OncoTree Tidygraph

March 16, 2020 |

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). ...

### OncoTree Tidygraph

March 16, 2020 |

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). ...

### GitHub Actions for Compiling and Converting LaTeX

March 7, 2020 |

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 ...

### GitHub Actions for Compiling and Converting LaTeX

March 7, 2020 |

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 ...

### Lithops

February 16, 2020 |

Lithops is one of my favorite type (specifically, genus) of plant. I find them charming and fascinating. For this reason, I own several adult specimens and am growing several species of Lithops from seeds: [Lithops from seed]() and [Lithops from seed (II)](). Below is some information on these interesting plants ... [Read more...]

### Setting axes to integer values in ‘ggplot2’

November 9, 2019 |

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 ...

### Setting axes to integer values in ‘ggplot2’

November 9, 2019 |

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 ...

### R Markdown animated GitHub corner

August 16, 2019 |

This is an incredibly easy way to spice up any R Markdown file. It adds an animated link to GitHub in the top corner of the HTML output, just like you see at the top of this page. Mouse over the icon to make it wave. All thanks and praise ... [Read more...]

### Rmarkdown animated GitHub corner

August 16, 2019 |

This is an incredibly easy way to spice up any Rmarkdown file. It adds an animated link to GitHub in the top corner of the HTML output, just like you see at the top of this page. Mouse over the icon to make it wave. All thanks and praise should ... [Read more...]

### Find the intersection of overlapping histograms in R

August 14, 2019 |

Here, I demonstrate how to find the point where two histograms overlap. While this is an approximation, it seems to have a very high level of precision. Prepare simulated data I created two data sets, gamma_dist and norm_dist, which are made up of a different number of values ...