EVOLUTION-MANAGER
Edit File: ui-questions.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: User interface - Questions</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for ui-questions {usethis}"><tr><td>ui-questions {usethis}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>User interface - Questions</h2> <h3>Description</h3> <p>These functions are used to interact with the user by posing a simple yes or no question. For details on the other <code style="white-space: pre;">ui_*()</code> functions, see the <a href="ui.html">ui</a> help page. </p> <h3>Usage</h3> <pre> ui_yeah( x, yes = c("Yes", "Definitely", "For sure", "Yup", "Yeah", "I agree", "Absolutely"), no = c("No way", "Not now", "Negative", "No", "Nope", "Absolutely not"), n_yes = 1, n_no = 2, shuffle = TRUE, .envir = parent.frame() ) ui_nope( x, yes = c("Yes", "Definitely", "For sure", "Yup", "Yeah", "I agree", "Absolutely"), no = c("No way", "Not now", "Negative", "No", "Nope", "Absolutely not"), n_yes = 1, n_no = 2, shuffle = TRUE, .envir = parent.frame() ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A character vector. </p> <p>For block styles, conditions, and questions, each element of the vector becomes a line, and the result is processed by <code><a href="../../glue/html/glue.html">glue::glue()</a></code>. For inline styles, each element of the vector becomes an entry in a comma separated list.</p> </td></tr> <tr valign="top"><td><code>yes</code></td> <td> <p>A character vector of "yes" strings, which are randomly sampled to populate the menu.</p> </td></tr> <tr valign="top"><td><code>no</code></td> <td> <p>A character vector of "no" strings, which are randomly sampled to populate the menu.</p> </td></tr> <tr valign="top"><td><code>n_yes</code></td> <td> <p>An integer. The number of "yes" strings to include.</p> </td></tr> <tr valign="top"><td><code>n_no</code></td> <td> <p>An integer. The number of "no" strings to include.</p> </td></tr> <tr valign="top"><td><code>shuffle</code></td> <td> <p>A logical. Should the order of the menu options be randomly shuffled?</p> </td></tr> <tr valign="top"><td><code>.envir</code></td> <td> <p>Used to ensure that <code><a href="../../glue/html/glue.html">glue::glue()</a></code> gets the correct environment. For expert use only.</p> </td></tr> </table> <h3>Value</h3> <p>A logical. <code>ui_yeah()</code> returns <code>TRUE</code> when the user selects a "yes" option and <code>FALSE</code> otherwise, i.e. when user selects a "no" option or refuses to make a selection (cancels). <code>ui_nope()</code> is the logical opposite of <code>ui_yeah()</code>. </p> <h3>See Also</h3> <p>Other user interface functions: <code><a href="ui.html">ui</a></code> </p> <h3>Examples</h3> <pre> ## Not run: ui_yeah("Do you like R?") ui_nope("Have you tried turning it off and on again?", n_yes = 1, n_no = 1) ui_yeah("Are you sure its plugged in?", yes = "Yes", no = "No", shuffle = FALSE) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>usethis</em> version 2.1.6 <a href="00Index.html">Index</a>]</div> </body></html>