Posts Tagged ‘ code ’

Statistical rethinking [book review]

April 5, 2016
By
Statistical rethinking [book review]

Statistical Rethinking: A Bayesian Course with Examples in R and Stan is a new book by Richard McElreath that CRC Press sent me for review in CHANCE. While the book was already discussed on Andrew’s blog three months ago, and [rightly so!] enthusiastically recommended by Rasmus Bååth on Amazon, here are the reasons why I […]

Read more »

New R Code for High-Frequency Financial Data Analysis

February 11, 2016
By

I looked through the manual (below). Looks well done.From the email:Package features estimators for working with high frequency market data.Microstructure Noise:- Autocovariance Noise Variance- Realized Noise Variance- Unbiased Realized Noise Variance...

Read more »

Write unit tests!

December 7, 2015
By
Write unit tests!

Since 2000, I’ve been working on R/qtl, an R package for mapping the genetic loci (called quantitative trait loci, QTL) that contribute to variation in quantitative traits in experimental crosses. The Bioinformatics paper about it is my most cited; also see my 2014 JORS paper, “Fourteen years of R/qtl: Just barely sustainable.” It’s a bit […]

Read more »

It’s not you, it’s me

September 24, 2015
By
It’s not you, it’s me

Somehow when my code stops working, my first (and second, and third) reaction is to blame everything except my own code. (“It’s not me, it’s you.”) And almost always, it’s my own code that’s the problem (hence the title of this post). I spent the day trying to resolve a bug in my early-in-development R […]

Read more »

It’s not you, it’s me

September 24, 2015
By
It’s not you, it’s me

Somehow when my code stops working, my first (and second, and third) reaction is to blame everything except my own code. (“It’s not me, it’s you.”) And almost always, it’s my own code that’s the problem (hence the title of this post). I spent the day trying to resolve a bug in my early-in-development R […]

Read more »

Randomized Hobbit

June 22, 2015
By
Randomized Hobbit

@wrathematics pointed me to his ngram R package for constructing and simulating from n-grams from text. I’d recently grabbed the text of the hobbit, and so I applied it to that text, with amusing results. Here’s the code I used to grab the text. Then calculate the ngrams with n=2. Simulate some number of words […]

Read more »

Randomized Hobbit

June 22, 2015
By
Randomized Hobbit

@wrathematics pointed me to his ngram R package for constructing and simulating from n-grams from text. I’d recently grabbed the text of the hobbit, and so I applied it to that text, with amusing results. Here’s the code I used to grab the text. Then calculate the ngrams with n=2. Simulate some number of words […]

Read more »

Error notifications from R

September 5, 2014
By
Error notifications from R

I’m enthusiastic about having R notify me when my script is done. But among my early uses of this, my script threw an error, and I never got a text or pushbullet about that. And really, I’m even more interested in being notified about such errors than anything else. It’s relatively easy to get notified […]

Read more »

Notifications from R

September 3, 2014
By
Notifications from R

You just sent a long R job running. How to know when it’s done? Have it notify you by beeping, sending you a text, or sending you a notification via pushbullet. beepr You can use Rasmus Bååth’s beepr package to have your computer play a sound. Install it from CRAN with Then, at the bottom […]

Read more »

Why hadn’t I written a function for that?

July 17, 2014
By
Why hadn’t I written a function for that?

I’m often typing the same bits of code over and over. Those bits of code really should be made into functions. For example, I’m still using base graphics. (ggplot2 is on my “to do” list, really!) Often some things will be drawn with a slight overlap of the border of the plotting region. And in […]

Read more »


Subscribe

Email:

  Subscribe