title: How to key in "Yes" or "No" in Jupyter notebook
body: <p>I already referred this <a href="https://stackoverflow.com/questions/49431895/answering-yes-no-shell-prompt-on-notebook">post</a> and this <a href="https://stackoverflow.com/questions/38798181/jupyter-notebook-is-there-a-way-to-answer-y-to-or-ignore-all-y-n-prompts">post</a>. But it doesn't solve my problem. Please don't mark it as duplicate</p>
  <p>I am trying to run the below piece of code in <code>Jupyter Notebook</code> with <code>R kernel</code>.</p>
  <pre><code>model_predictors &lt;- buildModel(flag, fv_full_data, outcomeName, folder)
  </code></pre>
  <p>I get an error message like below</p>
  <pre><code>Model about to be built   # this is log message and not error
  
  1 package is needed for this model and is not installed. (randomForest). Would you like to try to install it now?    # here I see that it asks for a question but without my input it selects `No`
  Error: Required package is missing
  Traceback:
  
  1. buildModel(flag, fv_full_data, outcomeName, folder)
  2. train(x = trainDF[, predictorsNames], y = factor(trainLabels), 
   .     method = &quot;rf&quot;, metric = &quot;Fscore&quot;, trControl = objControl, 
   .     tuneGrid = rf_grid, preProcess = c(&quot;center&quot;, &quot;scale&quot;))
  3. train.default(x = trainDF[, predictorsNames], y = factor(trainLabels), 
   .     method = &quot;rf&quot;, metric = &quot;Fscore&quot;, trControl = objControl, 
   .     tuneGrid = rf_grid, preProcess = c(&quot;center&quot;, &quot;scale&quot;))
  4. checkInstall(models$library)
  5. stop(&quot;Required package is missing&quot;, call. = FALSE)
  </code></pre>
  <p>How can I avoid this error and prevent jupyter selecting <code>No</code> as default for dynamic prompts?</p>