jupyter / jupyter/notebook

Run R with interactive()==TRUE

Open
#5,151 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
13.3k
Forks
5.8k
Avg merge
6d 11h
Merged PRs (30d)
7

Description

Hi everybody,

I am trying to run the following code :

```
library(tidytext)
get_sentiments("afinn")
```
but get the output and error that are given below. The problem is that the providers of that dataset want to force users to agree non-interactively through the use of the function menu(), which does not work when interactive()==FALSE. So I can not continue in Jupyter/IR.

Is there a way to still stay legal and still be able to run the code above? Jupyter/IR supports readline(). Is it possible to add support for menu() as well?

best regards
Servet

```
Do you want to download:
Name: AFINN-111
URL: http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6010
License: Open Database License (ODbL) v1.0
Size: 78 KB (cleaned 59 KB)
Download mechanism: https
Error in menu(choices = c("Yes", "No"), title = title): menu() cannot be used non-interactively
Traceback:

1. get_sentiments("afinn")
2. textdata::lexicon_afinn()
3. load_dataset(data_name = "afinn", name = "afinn_111.rds", dir = dir,
. delete = delete, return_path = return_path, clean = clean)
4. printer(data_name)
5. menu(choices = c("Yes", "No"), title = title)
6. stop("menu() cannot be used non-interactively")
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.