EVOLUTION-MANAGER
Edit File: askYesNo.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: Ask a Yes/No Question</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 askYesNo {utils}"><tr><td>askYesNo {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Ask a Yes/No Question </h2> <h3>Description</h3> <p><code>askYesNo</code> provides a standard way to ask the user a yes/no question. It provides a way for front-ends to substitute their own dialogs. </p> <h3>Usage</h3> <pre> askYesNo(msg, default = TRUE, prompts = getOption("askYesNo", gettext(c("Yes", "No", "Cancel"))), ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>msg</code></td> <td> <p>The prompt message for the user. </p> </td></tr> <tr valign="top"><td><code>default</code></td> <td> <p>The default response. </p> </td></tr> <tr valign="top"><td><code>prompts</code></td> <td> <p>Any of: a character vector containing 3 prompts corresponding to return values of <code>TRUE</code>, <code>FALSE</code>, or <code>NA</code>, or a single character value containing the prompts separated by <code>/</code> characters, or a function to call. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional parameters, ignored by the default function. </p> </td></tr> </table> <h3>Details</h3> <p><code>askYesNo</code> will accept case-independent partial matches to the prompts. If no response is given the value of <code>default</code> will be returned; if a non-empty string that doesn't match any of the prompts is entered, an error will be raised. </p> <p>If a function or single character string naming a function is given for <code>prompts</code>, it will be called as <code>fn(msg = msg, default = default, prompts = prompts, ...)</code>. On Windows, the GUI uses the unexported <code>utils:::askYesNoWinDialog</code> function for this purpose. </p> <p>If strings (or a string such as <code>"Y/N/C"</code>) are given as <code>prompts</code>, the choices will be mapped to lowercase for the non-default choices, and left as-is for the default choice. </p> <h3>Value</h3> <p><code>TRUE</code> for yes, <code>FALSE</code> for no, and <code>NA</code> for cancel. </p> <h3>See Also</h3> <p><code>readline</code> for more general user input. </p> <h3>Examples</h3> <pre> if (interactive()) askYesNo("Do you want to use askYesNo?") </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>