read

Hi everyone,

Our next meeting will take place on the 17th of July, from 5.30pm, in Appleton Tower room 2.14 (see the map below for further details). As usual, the meeting will be open for all to attend, and newcomers / beginners are very welcome!

Our first speaker is Ian White, from the Institute of Evolutionary Biology, University of Edinburgh. He will be discussing:

The stan MCMC package for R

(slides here)

Stan is open-source software for statistical modelling and high-performance statistical computation. It provides, among other things, full Bayesian statistical inference with MCMC sampling, approximate Bayesian variational inference, and penalized maximum likelihood estimation with optimization. For an overview, see Carpenter et al’s 2017 paper on Stan: A probabilistic programming language. I will give some simple examples using the R interface to Stan (package RStan).

Our second speaker will be Russell Hyde, Research Associate at the Institute of Cancer Sciences within Glasgow University. Russell will be sharing his work on a new R package:

Fixing duplicated code with dupree

(slides here or here)

When writing analysis scripts I frequently slip into two modes of working: the ‘rush-rush-rush-isn’t-everything-exciting’ exploratory phase where I write code too fast, and the ‘wow-this-script-is-way-too-complicated’ (and haven’t I written that somewhere else? and why’s that variable called that? and where did those tabs come from?) maintenance phase, where I have to edit down the rushed code before I can do anything new. To find a happy midpoint between these two extremes I started using styler and lintr (to catch formatting inconsistencies early) and I started developing a tool called dupree to help detect when code duplication starts entering my projects. By finding duplicated code, I can more quickly decide what bits of code to generalise.
dupree() can be run on sets of “.R” and “.Rmd” files, or across all files in an R package. But, to my knowledge, only two people have ever used it (myself included)… So in this talk I’m going to give some examples of how dupree works and how it might help your R workflow. I’m also going to give an introduction to lintr, because dupree uses some code from lintr (and I really like lintr).
I would be delighted if a few of you could try running dupree on one of your projects / packages before the talk. Feel free to ping me via the dupree github-issues page or on twitter with any feedback, in particular if any (or all) of the documentation is difficult to follow.

Bayesian inference with stan & avoiding code duplication with dupree

Our meeting is open for all to attend, and newcomers / beginners are very welcome! Our first speaker is Ian White, from the Institute of Evolutionary Biology, University of Edinburgh. He will be discussing the stan MCMC package for R.


Here is a map of where we’ll be hosting the meeting (which will be followed by a trip to the nearby Soul Nation pub):


See you there!

Caterina Constantinescu


Blog Logo

Dr. Caterina Constantinescu

Data scientist @ The Data Lab, University of Edinburgh.

If you would like to sponsor EdinbR, please get in touch!

• Content CC-BY 4.0 licensed.
Image

EdinbR: The Edinburgh R User Group


Back to Overview