Mac keyboard on laptop

Category Programming

Why is Rounding so Difficult?

photo with hundreds of pennies on a table with a jar.

I was today years old when I learned that the way I learned to round in school was not how everyone rounded. I was taught that the value 1.65, when rounded to one decimal point, would result in 1.7. Today…

Calculating Time Difference in R

Photo of old-school clocks with different times on the face.

Recently, I needed to calculate the time difference between two times that were exported from a system. The times in the report were formatted like “07:30:00 AM” or “04:00:00 PM”. This data in this particular data set does do not…

Two Ways to Benchmark Your R Scripts

Timex clock showing time

Sometimes you need to know how long your scripts take to process in order to make improvements or to get an idea of how long it will take to process in the future. Most times, I could care less about…

Writing Array Elements to CSV in Ruby

A bald man holding book in front of face. book says "fail, fail again, fail better."

There is nothing more frustrating than realizing that a ruby script failed when processing, and you do not know where it failed and where to pick up the processing. Having the ability to write results or values out to a…

What is a Data Frame in R?

RStudio IDE showing code to create a data frame.

I use data frames nearly every time I write a script in R. I’m usually reading and storing the contents of several CSV files to process its contents. The more you work in R, the more you are likely to…