rOpenSci | Blog

All posts (Page 82 of 121)

An Ode to Testing, my first review

To give you an idea of where I am in my R developer germination, I’d just started reading about testing when I received an email from @rOpenSci inviting me to review the weathercan package. Many of us in the R community feel like imposters when it comes to software development. In fact, as a statistician, it was a surprise to me when I was recently called a developer.

In terms of formal computer science training, I took one subject in first year, with the appropriate initialism OOF. Ostensibly, this was to school me in Object Oriented Fundamentals, but mostly educated me in just how much one person can pontificate about doubles and floats. I am almost always befuddled by regexes on the rare occasions I come across them.

...

Integrating data from weathercan

I love working with R and have been sharing the love with my friends and colleagues for almost seven years now. I’m one of those really annoying people whose response to most analysis-related questions is “You can do that in R! Five minutes, tops!” or “Three lines of code, I swear!” The problem was that I invariably spent an hour or more showing people how to get the data, load the data, clean the data, transform the data, and join the data, before we could even start the “five minute analysis”. With the advent of tidyverse, data manipulation has gotten much, much easier, but I still find that data manipulation is where most new users get stuck. This is one of the reasons why, when I designed weathercan, I tried as hard as possible to make it simple and straightforward....

rOpenSci Vancouver Community Meetup: Transforming science through open data and software

rOpenSci is holding our annual staff and leadership meeting in Vancouver, so we’re taking the opportunity to share what we do and, if you’re interested, how you can get involved. Join us for a series of 7 short talks and demos followed by informal networking over snacks & refreshments.

rOpenSci is a non-profit initiative that promotes open and reproducible research using shared data and reusable software. We are creating technical infrastructure in the form of carefully vetted, staff- and community-contributed R software tools that lower barriers to working with scientific data sources on the web, and building a welcoming and diverse global community of R users and developers from a range of research domains.

...

webmockr: mock HTTP requests

🔗

webmockr

webmockr is an R library for stubbing and setting expectations on HTTP requests. It is a port of the Ruby gem webmock.

webmockr works by plugging in to another R package that does HTTP requests. It currently only works with crul right now, but we plan to add support for curl and httr later.

webmockr has the following high level features:

  • Stubbing HTTP requests at low http client level
  • Setting expectations on HTTP requests
  • Matching requests based any combination of HTTP method (e.g., GET/POST/PUT), URI (i.e., URL), request headers and body
  • Will soon integrate with vcr so that you can cache real HTTP responses - and easily integrate with testthat

webmockr has been on CRAN for a little while now, but I’ve recently made some improvements and am nearing another CRAN release, which is also preparation for a first release of the related vcr package. The following is a run down of major features and how to use the package, including a bit on testing at the end.

...

Support for hOCR and Tesseract 4 in R

Earlier this month we released a new version of the tesseract package to CRAN. This package provides R bindings to Google’s open source optical character recognition (OCR) engine Tesseract.

Two major new features are support for HOCR and support for the upcoming Tesseract 4.

🔗

hOCR output

Support for HOCR output was requested by one of our users on Github. The ocr() function gains a parameter HOCR which allows for returning results in hOCR format:

...

Working together to push science forward

Happy rOpenSci users can be found at