Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with the timespan argument in query_tv #3

Closed
yeedle opened this issue Feb 24, 2017 · 0 comments
Closed

Issues with the timespan argument in query_tv #3

yeedle opened this issue Feb 24, 2017 · 0 comments

Comments

@yeedle
Copy link
Contributor

yeedle commented Feb 24, 2017

A call such as:

newsflash::query_tv("deep state",
                     timespan = NULL,
                     start_date = begin, end_date = end)

will result in

## 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant