1 min read

Pipeable survey analysis in R

Today, I accidentally found out about the ‘srvyr’ package, which is a wrapper for my ‘survey’ package to make it work with %>% pipes and dplyr and so on. 

  1.  Yay!

  2. R has a package discovery problem. I wouldn’t say I’m the most plugged-in of R users, but there must be a reasonable fraction who would be even less likely than me to find out about it.  
  3. Even though the ‘survey’ package design sticks fairly close to ‘tidy data’ principles, the fact that it uses different conventions from the `tidyverse’ packages means that there’s a whole lot of adaptor code needed. I could have fixed this by sticking to Hadley’s conventions, except that would have needed time travel.
  4. It’s much harder, sitting at the command line, to find the code that actually does the work in a pipeable tidyverse-type package. It’s clear that many people find that a good tradeoff, but I’m not sure it is for me.