Quantcast

ask.yes.no() function

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ask.yes.no() function

Duncan Murdoch-2
As described in
<https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17242>, R base
functions are currently inconsistent in asking interactive "yes/no" type
questions.  One solution to this is to have a function to do it, and to
use it consistently.

Rather than just writing such a function and possibly missing some
desirable feature, I'd like to ask if anyone can point to an existing
one that is perfect (or nearly perfect, and point out what changes would
be desirable)?

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ask.yes.no() function

Michael Sumner-2
Perhaps worth pointing out "yesno" as a candidate:


https://CRAN.R-project.org/package=yesno
<https://cran.r-project.org/package=yesno>

Cheers, Mike



On Wed, 19 Apr 2017 at 21:55 Duncan Murdoch <[hidden email]>
wrote:

As described in
<https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17242>, R base
functions are currently inconsistent in asking interactive "yes/no" type
questions. One solution to this is to have a function to do it, and to
use it consistently.




Rather than just writing such a function and possibly missing some
desirable feature, I'd like to ask if anyone can point to an existing
one that is perfect (or nearly perfect, and point out what changes would
be desirable)?

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
--
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ask.yes.no() function

Dirk Eddelbuettel

On 20 April 2017 at 09:33, Michael Sumner wrote:
| Perhaps worth pointing out "yesno" as a candidate:
|
| https://CRAN.R-project.org/package=yesno
| <https://cran.r-project.org/package=yesno>

Not really as

 i)  base R will not have dependencies outside of it

 ii) more importantly, Duncan asked for a good example of a "consistent" (as
     in: predictable) question function yet you submit one which by design
     *varies* answers to be less predictable.

Dirk
 
| Cheers, Mike
|
|
|
| On Wed, 19 Apr 2017 at 21:55 Duncan Murdoch <[hidden email]>
| wrote:
|
| As described in
| <https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17242>, R base
| functions are currently inconsistent in asking interactive "yes/no" type
| questions. One solution to this is to have a function to do it, and to
| use it consistently.
|
|
|
|
| Rather than just writing such a function and possibly missing some
| desirable feature, I'd like to ask if anyone can point to an existing
| one that is perfect (or nearly perfect, and point out what changes would
| be desirable)?
|
| Duncan Murdoch
|
| ______________________________________________
| [hidden email] mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel
| --
| Dr. Michael Sumner
| Software and Database Engineer
| Australian Antarctic Division
| 203 Channel Highway
| Kingston Tasmania 7050 Australia
|
| [[alternative HTML version deleted]]
|
| ______________________________________________
| [hidden email] mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ask.yes.no() function

Duncan Murdoch-2
On 20/04/2017 9:13 AM, Dirk Eddelbuettel wrote:

>
> On 20 April 2017 at 09:33, Michael Sumner wrote:
> | Perhaps worth pointing out "yesno" as a candidate:
> |
> | https://CRAN.R-project.org/package=yesno
> | <https://cran.r-project.org/package=yesno>
>
> Not really as
>
>  i)  base R will not have dependencies outside of it

Indeed, I'm looking for one that can be copied into base R.  The author
can retain copyright, but we need to be able to offer it under our GPL
license.

>
>  ii) more importantly, Duncan asked for a good example of a "consistent" (as
>      in: predictable) question function yet you submit one which by design
>      *varies* answers to be less predictable.

Yes, there are reasons to have questions that vary randomly, but I think
they don't apply to the situations where I want to use this.

Duncan Murdoch

>
> Dirk
>
> | Cheers, Mike
> |
> |
> |
> | On Wed, 19 Apr 2017 at 21:55 Duncan Murdoch <[hidden email]>
> | wrote:
> |
> | As described in
> | <https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17242>, R base
> | functions are currently inconsistent in asking interactive "yes/no" type
> | questions. One solution to this is to have a function to do it, and to
> | use it consistently.
> |
> |
> |
> |
> | Rather than just writing such a function and possibly missing some
> | desirable feature, I'd like to ask if anyone can point to an existing
> | one that is perfect (or nearly perfect, and point out what changes would
> | be desirable)?
> |
> | Duncan Murdoch
> |
> | ______________________________________________
> | [hidden email] mailing list
> | https://stat.ethz.ch/mailman/listinfo/r-devel
> | --
> | Dr. Michael Sumner
> | Software and Database Engineer
> | Australian Antarctic Division
> | 203 Channel Highway
> | Kingston Tasmania 7050 Australia
> |
> | [[alternative HTML version deleted]]
> |
> | ______________________________________________
> | [hidden email] mailing list
> | https://stat.ethz.ch/mailman/listinfo/r-devel
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Loading...