Decision Mechanics

Insight. Applied.

  • Services
    • Decision analysis
    • Big data analysis
    • Software development
  • Articles
  • Blog
  • Privacy
  • Hire us

R now has native pipes

May 18, 2021 By editor

The latest release of R introduces an F#-style pipe operator.

Pipes have been available in R for a while, via the magrittr package. However, with the release of R 4.1.0, pipes are supported in base R.

The syntax has changed from that used in magrittr. The magrittr pipe operator is %>%. The new base R pipe operator is |>.

So, instead of

df %>% head()

we have

df |> head()

R 4.1.0 also introduces a lightweight, lambda-style function syntax, which can be usefully combined with the new pipe operator when piping to an argument other than the first one.

iris |> {\(x) lm(Sepal.Width ~ Sepal.Length, data = x)}()

Filed Under: Data analysis Tagged With: magrittr, pipe, R

GlaxoSmithKline joins the R Consortium

May 5, 2021 By editor

GlaxoSmithKline (GSK) has reaffirmed it’s commitment to R by joining the R Consortium as a silver member.

Andy Nicholls, Senior Director, Head of Statistical Data Sciences at GSK, said

[R] will help us make better decisions, faster; to the benefit of patients everywhere.

Filed Under: Data analysis, Data science Tagged With: GlaxoSmithKline, pharma, R, R Consortium

COVID-19 modelling

April 6, 2020 By editor

Imperial College have published their COVID-19 modelling code on GitHub. Their modelling has apparently been used in forming UK policy.

Filed Under: General Tagged With: COVID-19, python, R, Stan

COVID-19 epidemiology with R

March 6, 2020 By editor

Interesting, and timely, article on using R to analyse COVID-19 incidence data collated by John Hopkins University.

It makes use of two epidemiology packages.

  • earlyR for estimation of infectiousness, as measured by the reproduction number (R), in the early stages of an outbreak.

  • EpiEstim for estimating the time varying instantaneous reproduction number during epidemics

These packages, and many more, are part of the R Epidemics Consortium (RECON). They

[…] gather experts in data science, modelling methodology, public health, and software development to create the next generation of analytics tools for informing the response to disease outbreaks, health emergencies and humanitarian crises, using the R software and other free, open-source resources.

Filed Under: General Tagged With: COVID-19, epidemiology, R

Is it easier to learn R or Python?

June 7, 2019 By editor

Andy Kirk at Visualising Data ran a Twitter poll about the relative accessibility of R and Python to non-developers.

59% said that R was more accessible.

Obviously, the poll is far from scientific, but the comments he received reflect my own experiences of teaching both languages—such as the significance of the RStudio IDE and the tidyverse packages in getting people off the ground.

Filed Under: Data analysis, Data science Tagged With: learning, python, R

  • 1
  • 2
  • 3
  • 4
  • Next Page »

Copyright © 2026 · Decision Mechanics Limited · info@decisionmechanics.com