Bits and Pieces
  • about
Categories
All (5)
bayes (1)
c (1)
frequentist (1)
functional programming (2)
parallel programming (1)
programming (1)
r (3)
rust (1)
statistics (2)
teaching (1)

CRusty R

Calling Rust from R using C
rust
r
c

Why would you only want to write one language when you can write all the languages. In this short post I’ll briefly explain how, with the help of C, you can write Rust functions that you can call from R.

Aug 22, 2022
Lincoln Colling

Functional programming in R: Part 2

Speeding up the BFDA R package with maps and parallel maps
functional programming
r
parallel programming

In Part 1 of this series, I showed how Functional-style code allows you to separate the what and the how of your code, and how doing so opened up new ways of solving programming problems. Part 1 covered the reduce / accumulate family of higher-order functions, and in the current post I cover the apply / map family of higher-order functions. Finally, I show how changing from loops to the apply / map family of higher-order functions parallel programming becomes a trivial matter of slightly modifying a function name.

Jul 7, 2022
Lincoln Colling

Understanding p values through simulation

statistics
frequentist
teaching

The properties of p values can be difficult to understand. Therefore, one way to develop a good conceptual understanding of p values is through simulation. The document below allows you to simulate experiments and to examine how the distribution of data and p-values change.

Jun 6, 2022
Lincoln Colling

Functional programming in R: Part 1

Speeding up the BFDA R package with reduce/accumulate
functional programming
r

There’s recently been a bit of talk on twitter about the relative benefits of loops versus more functional-style code. Most of these discussions have centred around the relative performance benefits. However, I think this slightly misses the point. Functional-style code allows you to separate the what and the how of your code in a way that opens up new ways of thinking about problems. The end result is often faster code, but this benefit comes from writing cleaner code the encourages clearer thinking. In this post, I show how to speed up some of the simulation code in the {BFDA} R package using functional design patterns. Specifically, reductions and accumulations (aka scans).

May 24, 2022
Lincoln Colling

Robustness analysis for informed Bayesian t-tests

Adventures in WASM and Quarto
programming
statistics
bayes

Currently, robustness analysis for informed Bayesian t-tests is not implemented in JASP. So I thought I’d just build it! This is also a great excuse to play around with Rust WASM and Observable blocks in Quarto.

Apr 14, 2022
Lincoln Colling
No matching items