Publications by nsaunders
Data discovery: seasonal speed
Just writing this one quickly as it’s been hanging around my browser tabs for weeks… I wrote Taking steps (in XML) almost 7 years ago and once in a while, I still grab Apple Health data from my phone and play around with it in R for a few minutes. Sometimes, curve fitting to a cloud of points generates a surprise. library(tidyverse) library(x...
910 sym R (614 sym/1 pcs) 2 img
Price’s Protein Puzzle: 2023 update
One of the joys (?) of having been online for…quite some time now…is watching topics reappear every few years or so. What is the longest coherent word or phrase present in the amino acid sequence of a real protein?— Dr. Caroline Bartman (@Caroline_Bartma) July 21, 2023 Yes, it’s Price’s Protein Puzzle which I last wrote about back in 201...
2945 sym
The “curse of the bye” revisited
A while ago we looked at Geelong and the curse of the bye. And since the AFL media have outdone themselves this year with “curse of the bye” articles: see for example here, here, here and here, I decided to revisit the topic in more depth. If you like that kind of thing head over to the report at Github. It has lots of charts like this one. Ex...
996 sym 2 img
Has your knowledge stopped updating?
Some years ago I read an article – I forget where – describing how our general knowledge often becomes frozen in time. Asked to name the tallest building in the world you confidently proclaim “the Sears Tower!”, because for most of your childhood that was the case – never mind that the record was surpassed long ago and it isn’t even c...
2358 sym R (281 sym/3 pcs)
Editing metadata in trail camera images using R, magick and exiftool
I have a new hobby: camera traps, also known as trail cameras. Strapped to trees in my local bushland they sit in wait, firing automatically when triggered by a passing animal. Once in a while, something quite magical happens. The camera model I chose is the Campark T85 which for me, had the right combination of features and price point. One use...
6216 sym R (4955 sym/14 pcs) 6 img
An R Wiki
It’s been ages since I visited the R website, so I don’t know how long they’ve had a wiki. It’s built using DokuWiki, one of my personal favourites. This is a great leap forward for R documentation, which is somewhat notorious for being (a) difficult to find and (b) difficult to understand when you find it. If you’re a power R user an...
811 sym 16 img
Baby steps with RSRuby in Rails
Plotting and charting libraries for Ruby (on Rails) abound. However, few are sophisticated enough for scientists and many are not actively maintained. Plotting in R, on the other hand, is about as sophisticated as it comes. Can we bridge Ruby and R? Yes we can, thanks to Alex Gutteridge’s RSRuby. The next logical question: how to plot data...
3385 sym Python (1411 sym/9 pcs) 14 img
RSRuby in the IRB console
R is terrific, of course, for all your statistical needs. But those data structures! “Everything is a list.” Leading to such wondrous ways to access variables as “p Sometimes, you want something more familiar. An array, a hash, a hash of arrays. Or, you may need to access R data in the language of your choice – e.g. as part of a Rai...
1272 sym R (123 sym/1 pcs) 14 img
R has a JSON package
Named rjson, appropriately. It’s quite basic just now, but contains methods for interconversion between R objects and JSON. Something like this: > library(rjson) > data <- list(a=1,b=2,c=3) > json <- toJSON(data) > json [1] "{"a":1,"b":2,"c":3}" > cat(json, file="data.json") Use cases? I wonder if RApache could be used to build an API that ...
751 sym R (131 sym/1 pcs) 12 img
A brief survey of R web interfaces
I’m looking at ways to provide access to R via a web application. First rule: see what’s available first, before you reinvent the wheel. It’s not pretty. From the R Web Interfaces FAQ: Software Brief notes Rweb Page last updated 1999. Of the 3 example links on the page one ran very slowly, the second not at all and the third is broken....
936 sym 12 img 1 tbl