Site icon R-bloggers

Comments on an R Connections API

[This article was first published on BioStatMatt » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I wrote this post months ago but never hit ‘Publish’. But, the subject has changed little since then. So, here’s to cleaning out the draft folder…

R‘s connections are the heart of data/code/text input and output. Without connections, R would be crippled. Additional connections make R more … connected with potential data sources and output sinks. It makes sense to build tools that safely create and manipulate connections.

These tools might be a collection of guidelines, for example, how to pass arguments to the connection generics seek, truncate, etc.; and adding read and write generics (by converting the existing write to default generic functionality). Alternatively, the tools might consist of a full blown connection API, perhaps at the R < emph>and C/C++ levels.

If there were support and consensus, I would commit additional effort to help implement and maintain a complete connections API for R. I believe others would also contribute, since there is documented interest. BTW, my post on serial connections has been the all-time most popular.

Indeed, some work towards a connections API already exists. Consider Jeff Horner’s connections API proposal. I’ve also briefly considered a reimplementation of the connections internals, though the idea is quite rough. It’s simply not worth pursuing without further consensus.

Some reasons to work towards a connections API

I’d be happy to add to this list, should anyone have other ideas.

To leave a comment for the author, please follow the link and comment on their blog: BioStatMatt » R.

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.