Publications by nsaunders

Idle thoughts lead to R internals: how to count function arguments

21.06.2018

“Some R functions have an awful lot of arguments”, you think to yourself. “I wonder which has the most?” It’s not an original thought: the same question as applied to the R base package is an exercise in the Functions chapter of the excellent Advanced R. Much of the information in this post came from there. There are lots of R package...

3682 sym R (2950 sym/13 pcs) 2 img

Twitter coverage of the useR! 2018 conference

16.07.2018

In summary: useR! the conference for users of R was held in Brisbane earlier this month it sounded like a lot of fun and here’s an analysis of tweets that used the #useR2018 hashtag during the week The code that generated the report (which I’ve used heavily and written about before) is at Github too. A few changes required compared with pre...

963 sym 2 img

Using leaflet, just because

17.07.2018

I love it when researchers take the time to share their knowledge of the computational tools that they use. So first, let me point you at Environmental Computing, a site run by environmental scientists at the University of New South Wales, which has a good selection of R programming tutorials. One of these is Making maps of your study sites. It w...

2661 sym R (1014 sym/1 pcs) 6 img

Just use a scatterplot. Also, Sydney sprawls.

17.07.2018

Dual-axes at tipping-pointSydney’s congestion at ‘tipping point’ blares the headline and to illustrate, an interactive chart with bars for city population densities, points for commute times and of course, dual-axes. Yuck. OK, I guess it does show that Sydney is one of three cities that are low density, but have comparable average commute t...

3867 sym R (960 sym/1 pcs) 12 img

Using OSX? Compiling an R package from source? Issues with ‘-fopenmp’? Try this.

18.11.2018

You can file this one under “I may have the very specific solution if you’re having exactly the same problem.” So: if you’re running some R code and you see a warning like this: Warning message: In checkMatrixPackageVersion() : Package version inconsistency detected. TMB was built with Matrix version 1.2.14 Current Matrix version is 1.2.1...

876 sym Python (576 sym/4 pcs)

Extracting data from news articles: Australian pollution by postcode

28.11.2018

The recent ABC News article Australia’s pollution mapped by postcode reveals nation’s dirty truth is interesting. It contains a searchable table, which is useful if you want to look up your own suburb. However, I was left wanting more: specifically, the raw data and some nice maps. So here’s how I got them, using R. The full details are in...

1380 sym 2 img

Price’s Protein Puzzle: 2019 update

30.01.2019

Chains of amino acids strung together make up proteins and since each amino acid has a 1-letter abbreviation, we can find words (English and otherwise) in protein sequences. I imagine this pursuit began as soon as proteins were first sequenced, but the first reference to protein word-finding as a sport is, to my knowledge, “Price’s Protein Pu...

4988 sym R (829 sym/3 pcs) 1 tbl

An absolute beginner’s guide to creating data frames for a Stack Overflow [r] question

07.02.2019

For better or worse I spend some time each day at Stack Overflow [r], reading and answering questions. If you do the same, you probably notice certain features in questions that recur frequently. It’s as though everyone is copying from one source – perhaps the one at the top of the search results. And it seems highest-ranked is not always bes...

2324 sym R (834 sym/6 pcs)

Using parameters in Rmarkdown

04.03.2019

Nothing new or original here, just something that I learned about quite recently that may be useful for others. One of my more “popular” code repositories, judging by Twitter, is – well, Twitter. It mostly contains Rmarkdown reports which summarise meetings and conferences by analysing usage of their associated Twitter hashtags. The reports...

1581 sym R (308 sym/2 pcs)

This is not normal(ised)

11.03.2019

“Sydney stations where commuters fall through gaps, get stuck in lifts” blares the headline. The story tells us that: Central Station, the city’s busiest, topped the list last year with about 54 people falling through gaps Wow! Wait a minute… Central Station, the city’s busiest Some poking around in the NSW Transport Open Data portal re...

1300 sym R (375 sym/1 pcs) 4 img