## Error in if (is.null(timespan) | (tolower(timespan) != "all")) { :
## argument is of length zero
It's a simple bug: the | operator is not short-circuiting, you gotta use || for that.
Another "issue", if you can call it that, is that setting start_date and end_date does not automatically change the value of timespan from "all" to NULL or something else, silently giving you back results for all time unles timespane is explicitly set to something else. I think a more intuitive behavior would be if the user sets start_date and end_date to assume timespan is not "all".
A call such as:
will result in
It's a simple bug: the
|
operator is not short-circuiting, you gotta use||
for that.Another "issue", if you can call it that, is that setting
start_date
andend_date
does not automatically change the value oftimespan
from"all"
toNULL
or something else, silently giving you back results for all time unlestimespane
is explicitly set to something else. I think a more intuitive behavior would be if the user setsstart_date
andend_date
to assumetimespan
is not"all"
.