For a project, I needed to re-familiarize myself with the concept of Muskingum routing. I looked up the theory, found a working example and coded the thing in R. As I suspected I could make the calculation more efficient by using linear algebra (how wrong I was!), I also took the matrix route. Finally, as I was looking to get some experience with R Markdown I wrote the whole thing down. For reference. It’ll be useful for myself and maybe also for others. Anyway – the results are in this document. Happy Reading!