pablobarbera / Rfacebook

Dev version of Rfacebook package: Access to Facebook API via R
http://cran.r-project.org/web/packages/Rfacebook
350 stars 250 forks source link

Please remove the verbose switch in getPage and use message() instead #145

Open mw-stanley opened 7 years ago

mw-stanley commented 7 years ago

It's not really clear to me why the verbose switch and the subsequent call to cat() in getPage() exist when the messaging system exists for the exact same purpose. message() is used elsewhere in the function and it would make more sense to be consistent. If the intent was to allow users to suppress some messages and not others, you could use the existing condition system to signal the different conditions.

This has already confused one user at least:

https://www.reddit.com/r/Rlanguage/comments/6tlqy3/stop_for_loop_printing_to_slides_rfacebook/ https://stackoverflow.com/questions/45622375/stop-rfacebook-for-loop-outputting-while-still-running-code

Please let me know your opinion on this and I will gladly submit a PR with the change.

pablobarbera commented 7 years ago

Thanks for suggesting this! It mostly reflects my own ignorance about R programming when I started writing the package :-) I thought I had switched all the output to message() by now but I guess not. Feel free to submit a PR but if not I can fix this later this week as well. Thanks again!