Skip to content

Add argument ask_special_io to enable skipping user input prompt#334

Open
pot-belly-mole wants to merge 1 commit into
rOpenGov:masterfrom
pot-belly-mole:feature/optional-special-io
Open

Add argument ask_special_io to enable skipping user input prompt#334
pot-belly-mole wants to merge 1 commit into
rOpenGov:masterfrom
pot-belly-mole:feature/optional-special-io

Conversation

@pot-belly-mole

@pot-belly-mole pot-belly-mole commented Jul 14, 2026

Copy link
Copy Markdown

When requesting one of the input-output tables, like "naio_10_cp1750", in an interactive R session, one currently receives a prompt for user input: "The requested product id is a special input-output matrix. To keep the matrix structure for further use, download it with iotables::iotables_download(). The iotables package is an extension for such cases to the eurostat package. Do you want to stop downloading now? [y/n]"

It was not possible to skip this prompt in an interactive session, which causes issues when used eg. in a pipeline with targets package. Also, there is no (good) way to fake a non-interactive session or otherwise fake input to readline.

This pull request addresses that issue by introducing a new argument ask_special_io to get_eurostat_json, which enables to skip the prompt, if given the value FALSE.

Open questions:

  • is the name of the argument ok
  • should it be exposed to get_eurostat

I would be fine with this solution that enables skipping the prompt by using the lower level get_eurostat_json function, but of course it could be exposed to the general function as well.

@antagomir
antagomir requested a review from pitkant July 14, 2026 22:36
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

Successfully merging this pull request may close these issues.

1 participant