package development

A 6-post collection

A quieter scrobbler

By Conor Neilson |  Aug 15, 2021  | package-development, r
I just released a tiny update to scrobbler. Something you may have noticed is that scrobbler can sometimes be rather loud when you are using it. When downloading scrobbles it likes to print your username and api key periodically. This is both annoying and (in the case of the api key) rather unsafe. The new version of scrobbler will still print its progress indicators, but will no longer emit your authentication details.
Continue Reading...

Current dev project - spotty

By Conor Neilson |  Aug 15, 2021  | package-development, r
I started playing around with a new package today which I’ve titled spotty. spotty’s goal is to be a minimal wrapper around the spotify API. It intends to only do a small number of things but do them well. There is of course the very well done package spotifyr by Charlie Thompson. spotty is not indended to compete with this package at all, and will not come anywhere near the breadth of features offered by spotifyr
Continue Reading...

Announcing 'words'; an R package containing scrabble allowed english words

By R package build |  May 16, 2021  | package-development, r, tutorial
I’m thrilled to announce the release of my new package words. words is an extremely simple package, but I’m excited to use it for my future projects. Recently I’ve been playing around with some word based puzzles in R. One of the examples of this is wordbuilder, which finds all valid words of from a given list of 5 letters. In an example like this, one of the challenges is finding a list of valid english words.
Continue Reading...

Auto-authentication with scrobbler

By R package build |  Jan 31, 2021  | r, tutorial, package-development
Authenticate automatically using environment variables I’m pleased to announce a new version of scrobbler which introduces a slightly new way to authenticate download_scrobbles and update_scrobbles calls. This change is released on CRAN, so you can get the update by running install.packages("scrobbler") New authentication In previous versions of scrobbler, whenever you wanted to download scrobbles you had to pass in your username and API key. library(scrobbler) my_data <- download_scrobbles(username = "your_username", api_key = "your_api_key") This quickly gets tiring (particularly with the API key), so I’m pleased to announce there is now a better way.
Continue Reading...

Resetting fileInput in Shiny

By Conor Neilson |  Apr 5, 2020  | package-development, r, tutorial
While working on my (currently WIP) package nebula, I ran into an issue with resetting the fileInput component in Shiny. In short, nebula allows you to upload a photo of an otolith (fish ear bone), and mark the positions of the growth rings (like in a tree trunk). Once you’ve finished, you can download the positions as a csv file. The issue I ran into, is once you’ve finished marking your photo, if you want to then start a new photo, you need some way of resetting the fileInput, and removing the current photo.
Continue Reading...

A silly typing mistake

By Conor Neilson |  Mar 14, 2020  | r, package-development
Recently I was working on my WIP package ‘verhoeff’, for calculating check digits based on the Verhoeff algorithim. I was at the stage where most of the basic code was written, so I was starting to test simple examples. I was testing an early implementation which I thought would work. I used the code calculate_digit(prepare_number(1), dat$d5, dat$d5_p, dat$inv_v) In this code, prepare_number simply does some checks to see if the number is valid, and converts it to a numeric vector.
Continue Reading...