Data serialization in R and Racket

When programming in R, I generally pass data around by reading and writing text files (typically, CSV files). The ubiquity of CSV files means that many different types of software will open them easily (e.g., Notepad, Excel, TextEdit, etc.). However, if the data structure is not flat or contains other attributes, then writing to CSV requires flattening and/or dropping attributes. The general solution to writing data to a file while retaining structure and attributes is serialization.

Storing parameters in named lists and hash tables in R and Racket

When building a simulation model in R, I might want to group related input parameters into a data structure. For example, in a life cycle model with resident and anadromous fish, you might use different fecundity parameters for each life history type. One option is to create different objects for each fecundity parameter.

Nested for loops in R and Racket

I have recently started learning Racket. For a first task, I tried to build a simple age-structured population model. I hit a stumbling block and reached out to the helpful folks on the Racket mailing list. In this post, I recap the mailing list exchange with a target audience of R programmers that are interested in learning more about Racket.

DataTables from the DT package as a Shiny CRUD app interface

Shiny Scorekeeper is a basketball scorekeeper app built with the Shiny web framework for R. I needed a new app for scoring video of my son's basketball games and I decided it would be a good learning experience to try to build my own. In this post, I describe using DataTables from the DT package as the interface to the CRUD (create-read-update-delete) features in Shiny Scorekeeper. The post assumes familiarity with features of Shiny apps, particularly reactiveValues(), observe(), and observeEvent().

Expanding my programming horizons

For many years, I've had intentions of learning another programming language. I would guess that I've done 70-80% of my programming work in R and 20-30% in NetLogo. Those two languages have served me well and I haven't yet been in a position where I was required to learn a new language for work. Lately, I've been thinking about my professional development goals and how learning a new programming language might fit into those goals.