Can anybody help me translate a three line ruby script for doing content-negotiation into idiomatic R? #lazy