I submitted a package to CRAN that contains three functions. Each of these functions rely on console interaction to properly execute. I am having trouble with writing examples in the .Rd files because of the interactive nature of these functions. Specifically, menu()
and readline()
, both used heavily in my package, are giving me problems. When running devtools::check()
, I get an error regarding the examples, stating "menu() cannot be used non-interactively."
I tried to take a shortcut by writing out directions to run each function as comments in the @examples
field, e.g.
@examples #Run my_function()
#When prompted with 'Question?', type '2' and press Enter
This workaround was not accepted by CRAN. Any suggestions?