Publications by Brian Lee Yung Rowe
Pricing interest rate swaps with lambda.r
People think I’m joking when I say something should only take 20 lines of code. More often than not it is possible if you understand how to strip away unnecessary complexity. This example shows how to calculate the theoretical swap rate for an interest rate swap given its terms. What’s nice about this example is that it demonstrates the value...
1719 sym R (1072 sym/3 pcs) 4 img
Church numerals in R (or how to prove the existence of natural numbers using the lambda calculus)
One area of math that I’ve always been enamored with is the proof of numbers. The simplicity of the starting assumptions exudes a certain elegance. More startling is how much structure can be created from such simple initial states. Not so different from Conway’s game of Life or the board game go, both of which have simple rues yet produce v...
3256 sym R (399 sym/5 pcs) 26 img
Preview of my book – Modeling data with functional programming in R
As some of you know, I’ve been writing a book (to be published by CRC Press/Chapman & Hall and released in late 2014) for the past year and a half. It’s one of those books that spans multiple disciplines so is both unique and also niche. In essence it’s a manifesto of sorts on using functional programming for mathematical modeling and analy...
2462 sym 4 img
Book example – iterative function systems for generating fractals
A number of people suggested that my book, Modeling Data With Functional Programming In R, be more upfront with examples since the benefits of functional programming may not be immediately obvious to readers. As a first example, I have implemented some iterative function systems for a few common fractals. Iterative function systems are an elegant...
6924 sym R (1193 sym/6 pcs) 36 img
Lambda.r at FP Days 2013 in Cambridge, UK
After a bit of a hiatus in public speaking, I will be presenting Functional Programming In The Computational Sciences With Lambda.r at this year’s FP Days conference in Cambridge. This will be my first talk on ideas from my book, and I think the slides are shaping up nicely. The core message is that embracing the duality between mathematics and...
1880 sym 4 img
Quick tip on controlling log output in tests
When running tests for a package, it’s important that the console output is unadulterated since test results are printed with formatting. My code is littered with log output using my futile.logger package [1]. Since arbitrary appenders are supported in futile.logger, a neat trick is to redirect output to a file when running the tests. This is a...
1336 sym R (228 sym/3 pcs) 4 img
Slides from FP Days
These are the slides from my talk at FP Days 2013. The first part goes into more detail about why functional programming is a good match for data analysis. It brings together a number of concepts and ideas I’ve written about here, while also elaborating a bit on the functional nature of mathematics. The second part talks a bit about how my tech...
1095 sym 4 img
Curve sketching for calculus
This is a short post for my students in the CUNY MS Data Analytics program on sketching curves in R. Graphing functions Suppose we want to find the derivative of . In addition to computing the derivative analytically, it might be interesting to graph this function to see what it looks like. When graphing a function, I like to generate a sequence ...
6563 sym R (395 sym/4 pcs) 110 img
From area under the curve to the fundamental theorem of calculus
This is a lecture post for my students in the CUNY MS Data Analytics program. In this series of lectures I discuss mathematical concepts from different perspectives. The goal is to ask questions and challenge standard ways of thinking about what are generally considered basic concepts. Consequently these lectures will not always be as rigorous as...
4718 sym R (558 sym/7 pcs) 78 img
Visualizing systems of linear equations and linear transformations
This is a lecture post for my students in the CUNY MS Data Analytics program. In this series of lectures I discuss mathematical concepts from different perspectives. The goal is to ask questions and challenge standard ways of thinking about what are generally considered basic concepts. Consequently these lectures will not always be as rigorous as...
5033 sym R (3160 sym/3 pcs) 30 img