When a Tweet Turns Into an R Package
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Reproduced with the kind permission of our Head of Data Engineering, Mark Sellors and first published on his blog
When a Tweet Turns Into an R Package
I just wanted to write up a brief post about the power of R, its community, and tell the story of how actually putting stuff out into the world can have amazing consequences.
About 24 hours ago I was going to tweet something like this:
Hey Mac #rstats users – system(‘say “hello rstats user”’)
I’d been playing with the MacOS command line tool, ‘say’, with the kids, and just figured it would be funny to make R say stuff.
Before I tweeted though, I thought I’d better check that it worked as intended. While I was doing that I decided it would be fun to expose the say command’s different voices and figured I’d make a gist on github instead, as it was getting too long for a tweet.
So, I started playing around with the different voices and thinking of a nice way to expose that and by this point I’m thinking I might as well just make it into a package. Making a package in RStudio is so easy, it seemed like the easiest way to share what I was doing. And so now we have the rsay package.
Bear in mind that I didn’t start out to create a package. It has one function, which is essentially the thinnest wrapper around an existing command line tool and it only works on MacOS and it’s pretty silly really, so I didn’t expect there to be a great deal of interest.
In the end, instead of tweeting that one command, I tweeted about how I accidentally made this R package.
That in turn got noticed by the awesome Mara Averick, which resulted in this tweet:
????
— Mara Averick (@dataandme) December 9, 2017
To illustrate the incredible power of @sellorm's new ?, “rsay”https://t.co/twYQZSU9RJ #rstats pic.twitter.com/DFg94bKsDZ
Then Mark Edmondson sees Mara’s tweet, and mentions how it might be fun to build it into a sort of Babelfish using some of his existing work around the Google APIs. (Mark knows a lot about Google’s APIs and R!)
A few hours after initially mentioning this, the following tweet appears in my timeline:
Using @sellorm 's new rsay package that talks to you on MacOS, enhanced the googleLanguageR demo Shiny app so that it now can transcribe speech to text, translate it, and talk back to you https://t.co/rsip5VltGg pic.twitter.com/DvGzEBicIB
— Mark Edmondson (@HoloMarkeD) December 9, 2017
He’d only gone and done it – How cool is that?!?!
To recap; silly idea, and R’s easy to use packaging tools lead to an accidental (but still pretty silly) R package. Package is popularised by prominent developer advocate. Package is then integrated into a shiny app for automated machine translation, by well known R/Google API developer.
It’s been a fun 24 hours, but the main thing to take away, is just to get your stuff out there, even if you don’t think it’s that great/interesting/useful. When you share an idea, even if it seems frivolous or trivial, that idea takes on a life of its own and you never know where that may lead.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.