sensebox / opensensmapR

R client for opensensemap.org
https://noerw.github.io/opensensmapR/inst/doc/osem-history
8 stars 5 forks source link

allow to suppress downloading message #11

Closed nuest closed 6 years ago

nuest commented 6 years ago

Here httr::progress() is always used. It would be useful to be able to turn this off when calling osem_() functions, maybe

osem_boxes(, progress = NULL)

while keeping the default.

Try out using the function within an R Markdown document (yes, you can hide chunk output, but only for the whole chunk):

---
title: "Test"
author: "Daniel Nüst"
date: "1/4/2018"
output: html_document
---

```{r}
library("opensensemapr")

osem_measurements("PM2.5")
sessionInfo()


![image](https://user-images.githubusercontent.com/1325054/34570760-077d91ec-f16d-11e7-9762-e36a7266c683.png)
noerw commented 6 years ago

I see the issue. However I don't like to pass even more arguments for a feature which should just make the user's life simpler. What do you think about automatically suppressing the output in non-interactive sessions like knitr instead?

nuest commented 6 years ago

Well, more parameters with a default do not really impact regular user experience IMHO.

But handling it automatically for knitr sounds great.